Loading packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/CameraToggleTileTest.kt +4 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,8 @@ class CameraToggleTileTest(flags: FlagsParameterization) : SysuiTestCase() { keyguardStateController, safetyCenterManager, ) cameraTile.initialize() testableLooper.processAllMessages() assertThat(cameraTile.longClickIntent?.action).isEqualTo(Settings.ACTION_PRIVACY_CONTROLS) cameraTile.destroy() testableLooper.processAllMessages() Loading @@ -171,6 +173,8 @@ class CameraToggleTileTest(flags: FlagsParameterization) : SysuiTestCase() { keyguardStateController, safetyCenterManager, ) cameraTile.initialize() testableLooper.processAllMessages() assertThat(tile.longClickIntent?.action).isEqualTo(Settings.ACTION_PRIVACY_SETTINGS) cameraTile.destroy() testableLooper.processAllMessages() Loading packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/MicrophoneToggleTileTest.kt +4 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,8 @@ class MicrophoneToggleTileTest(flags: FlagsParameterization) : SysuiTestCase() { keyguardStateController, safetyCenterManager, ) micTile.initialize() testableLooper.processAllMessages() assertThat(micTile.longClickIntent?.action).isEqualTo(Settings.ACTION_PRIVACY_CONTROLS) micTile.destroy() testableLooper.processAllMessages() Loading @@ -171,6 +173,8 @@ class MicrophoneToggleTileTest(flags: FlagsParameterization) : SysuiTestCase() { keyguardStateController, safetyCenterManager, ) micTile.initialize() testableLooper.processAllMessages() assertThat(micTile.longClickIntent?.action).isEqualTo(Settings.ACTION_PRIVACY_SETTINGS) micTile.destroy() testableLooper.processAllMessages() Loading packages/SystemUI/src/com/android/systemui/qs/tiles/SensorPrivacyToggleTile.java +10 −2 Original line number Diff line number Diff line Loading @@ -54,9 +54,11 @@ public abstract class SensorPrivacyToggleTile extends QSTileImpl<QSTile.BooleanS IndividualSensorPrivacyController.Callback { private final KeyguardStateController mKeyguard; private final SafetyCenterManager mSafetyCenterManager; protected IndividualSensorPrivacyController mSensorPrivacyController; private final Boolean mIsSafetyCenterEnabled; // Set delayed in the background thread. private boolean mIsSafetyCenterEnabled; /** * @return Id of the sensor that will be toggled Loading Loading @@ -90,10 +92,16 @@ public abstract class SensorPrivacyToggleTile extends QSTileImpl<QSTile.BooleanS statusBarStateController, activityStarter, qsLogger); mSensorPrivacyController = sensorPrivacyController; mKeyguard = keyguardStateController; mIsSafetyCenterEnabled = safetyCenterManager.isSafetyCenterEnabled(); mSafetyCenterManager = safetyCenterManager; mSensorPrivacyController.observe(getLifecycle(), this); } @Override protected void handleInitialize() { super.handleInitialize(); mIsSafetyCenterEnabled = mSafetyCenterManager.isSafetyCenterEnabled(); } @Override public BooleanState newTileState() { return new BooleanState(); Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/CameraToggleTileTest.kt +4 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,8 @@ class CameraToggleTileTest(flags: FlagsParameterization) : SysuiTestCase() { keyguardStateController, safetyCenterManager, ) cameraTile.initialize() testableLooper.processAllMessages() assertThat(cameraTile.longClickIntent?.action).isEqualTo(Settings.ACTION_PRIVACY_CONTROLS) cameraTile.destroy() testableLooper.processAllMessages() Loading @@ -171,6 +173,8 @@ class CameraToggleTileTest(flags: FlagsParameterization) : SysuiTestCase() { keyguardStateController, safetyCenterManager, ) cameraTile.initialize() testableLooper.processAllMessages() assertThat(tile.longClickIntent?.action).isEqualTo(Settings.ACTION_PRIVACY_SETTINGS) cameraTile.destroy() testableLooper.processAllMessages() Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/MicrophoneToggleTileTest.kt +4 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,8 @@ class MicrophoneToggleTileTest(flags: FlagsParameterization) : SysuiTestCase() { keyguardStateController, safetyCenterManager, ) micTile.initialize() testableLooper.processAllMessages() assertThat(micTile.longClickIntent?.action).isEqualTo(Settings.ACTION_PRIVACY_CONTROLS) micTile.destroy() testableLooper.processAllMessages() Loading @@ -171,6 +173,8 @@ class MicrophoneToggleTileTest(flags: FlagsParameterization) : SysuiTestCase() { keyguardStateController, safetyCenterManager, ) micTile.initialize() testableLooper.processAllMessages() assertThat(micTile.longClickIntent?.action).isEqualTo(Settings.ACTION_PRIVACY_SETTINGS) micTile.destroy() testableLooper.processAllMessages() Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/SensorPrivacyToggleTile.java +10 −2 Original line number Diff line number Diff line Loading @@ -54,9 +54,11 @@ public abstract class SensorPrivacyToggleTile extends QSTileImpl<QSTile.BooleanS IndividualSensorPrivacyController.Callback { private final KeyguardStateController mKeyguard; private final SafetyCenterManager mSafetyCenterManager; protected IndividualSensorPrivacyController mSensorPrivacyController; private final Boolean mIsSafetyCenterEnabled; // Set delayed in the background thread. private boolean mIsSafetyCenterEnabled; /** * @return Id of the sensor that will be toggled Loading Loading @@ -90,10 +92,16 @@ public abstract class SensorPrivacyToggleTile extends QSTileImpl<QSTile.BooleanS statusBarStateController, activityStarter, qsLogger); mSensorPrivacyController = sensorPrivacyController; mKeyguard = keyguardStateController; mIsSafetyCenterEnabled = safetyCenterManager.isSafetyCenterEnabled(); mSafetyCenterManager = safetyCenterManager; mSensorPrivacyController.observe(getLifecycle(), this); } @Override protected void handleInitialize() { super.handleInitialize(); mIsSafetyCenterEnabled = mSafetyCenterManager.isSafetyCenterEnabled(); } @Override public BooleanState newTileState() { return new BooleanState(); Loading