Loading packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt +7 −7 Original line number Diff line number Diff line Loading @@ -86,9 +86,9 @@ class PrivacyItemController @Inject constructor( ALL_INDICATORS, DEFAULT_ALL_INDICATORS) } // TODO(b/168209929) Remove hardcode private fun isMicCameraEnabled(): Boolean { return deviceConfigProxy.getBoolean(DeviceConfig.NAMESPACE_PRIVACY, MIC_CAMERA, DEFAULT_MIC_CAMERA) return true } private var currentUserIds = emptyList<Int>() Loading Loading @@ -124,11 +124,11 @@ class PrivacyItemController @Inject constructor( DEFAULT_ALL_INDICATORS) callbacks.forEach { it.get()?.onFlagAllChanged(allIndicatorsAvailable) } } if (properties.keyset.contains(MIC_CAMERA)) { micCameraAvailable = properties.getBoolean(MIC_CAMERA, DEFAULT_MIC_CAMERA) callbacks.forEach { it.get()?.onFlagMicCameraChanged(micCameraAvailable) } } // TODO(b/168209929) Uncomment // if (properties.keyset.contains(MIC_CAMERA)) { // micCameraAvailable = properties.getBoolean(MIC_CAMERA, DEFAULT_MIC_CAMERA) // callbacks.forEach { it.get()?.onFlagMicCameraChanged(micCameraAvailable) } // } internalUiExecutor.updateListeningState() } } Loading packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerFlagsTest.kt +8 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import com.android.systemui.util.time.FakeSystemClock import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Ignore import org.junit.Test import org.junit.runner.RunWith import org.mockito.ArgumentCaptor Loading Loading @@ -106,6 +107,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testMicCameraChanged() { changeMicCamera(false) // default is true executor.runAllReady() Loading @@ -129,6 +131,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testBothChanged() { changeAll(true) changeMicCamera(false) Loading @@ -150,6 +153,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testMicCamera_listening() { changeMicCamera(true) executor.runAllReady() Loading @@ -158,6 +162,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testAllFalse_notListening() { changeAll(true) executor.runAllReady() Loading @@ -169,6 +174,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testSomeListening_stillListening() { // Mic and camera are true by default changeAll(true) Loading @@ -180,6 +186,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testAllDeleted_micCameraFalse_stopListening() { changeMicCamera(false) changeAll(true) Loading @@ -191,6 +198,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testMicDeleted_stillListening() { changeMicCamera(true) executor.runAllReady() Loading packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerTest.kt +2 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import org.junit.Assert.assertEquals import org.junit.Assert.assertThat import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Ignore import org.junit.Test import org.junit.runner.RunWith import org.mockito.ArgumentCaptor Loading Loading @@ -271,6 +272,7 @@ class PrivacyItemControllerTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testNotListeningWhenIndicatorsDisabled() { changeAll(false) changeMicCamera(false) Loading Loading
packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt +7 −7 Original line number Diff line number Diff line Loading @@ -86,9 +86,9 @@ class PrivacyItemController @Inject constructor( ALL_INDICATORS, DEFAULT_ALL_INDICATORS) } // TODO(b/168209929) Remove hardcode private fun isMicCameraEnabled(): Boolean { return deviceConfigProxy.getBoolean(DeviceConfig.NAMESPACE_PRIVACY, MIC_CAMERA, DEFAULT_MIC_CAMERA) return true } private var currentUserIds = emptyList<Int>() Loading Loading @@ -124,11 +124,11 @@ class PrivacyItemController @Inject constructor( DEFAULT_ALL_INDICATORS) callbacks.forEach { it.get()?.onFlagAllChanged(allIndicatorsAvailable) } } if (properties.keyset.contains(MIC_CAMERA)) { micCameraAvailable = properties.getBoolean(MIC_CAMERA, DEFAULT_MIC_CAMERA) callbacks.forEach { it.get()?.onFlagMicCameraChanged(micCameraAvailable) } } // TODO(b/168209929) Uncomment // if (properties.keyset.contains(MIC_CAMERA)) { // micCameraAvailable = properties.getBoolean(MIC_CAMERA, DEFAULT_MIC_CAMERA) // callbacks.forEach { it.get()?.onFlagMicCameraChanged(micCameraAvailable) } // } internalUiExecutor.updateListeningState() } } Loading
packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerFlagsTest.kt +8 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import com.android.systemui.util.time.FakeSystemClock import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Ignore import org.junit.Test import org.junit.runner.RunWith import org.mockito.ArgumentCaptor Loading Loading @@ -106,6 +107,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testMicCameraChanged() { changeMicCamera(false) // default is true executor.runAllReady() Loading @@ -129,6 +131,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testBothChanged() { changeAll(true) changeMicCamera(false) Loading @@ -150,6 +153,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testMicCamera_listening() { changeMicCamera(true) executor.runAllReady() Loading @@ -158,6 +162,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testAllFalse_notListening() { changeAll(true) executor.runAllReady() Loading @@ -169,6 +174,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testSomeListening_stillListening() { // Mic and camera are true by default changeAll(true) Loading @@ -180,6 +186,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testAllDeleted_micCameraFalse_stopListening() { changeMicCamera(false) changeAll(true) Loading @@ -191,6 +198,7 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testMicDeleted_stillListening() { changeMicCamera(true) executor.runAllReady() Loading
packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerTest.kt +2 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import org.junit.Assert.assertEquals import org.junit.Assert.assertThat import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Ignore import org.junit.Test import org.junit.runner.RunWith import org.mockito.ArgumentCaptor Loading Loading @@ -271,6 +272,7 @@ class PrivacyItemControllerTest : SysuiTestCase() { } @Test @Ignore // TODO(b/168209929) fun testNotListeningWhenIndicatorsDisabled() { changeAll(false) changeMicCamera(false) Loading