Loading packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt +8 −7 Original line number Original line Diff line number Diff line Loading @@ -88,9 +88,9 @@ class PrivacyItemController @Inject constructor( ALL_INDICATORS, DEFAULT_ALL_INDICATORS) ALL_INDICATORS, DEFAULT_ALL_INDICATORS) } } // TODO(b/168209929) Remove hardcode private fun isMicCameraEnabled(): Boolean { private fun isMicCameraEnabled(): Boolean { return true return deviceConfigProxy.getBoolean(DeviceConfig.NAMESPACE_PRIVACY, MIC_CAMERA, DEFAULT_MIC_CAMERA) } } private fun isLocationEnabled(): Boolean { private fun isLocationEnabled(): Boolean { Loading Loading @@ -140,11 +140,12 @@ class PrivacyItemController @Inject constructor( DEFAULT_ALL_INDICATORS) DEFAULT_ALL_INDICATORS) callbacks.forEach { it.get()?.onFlagAllChanged(allIndicatorsAvailable) } callbacks.forEach { it.get()?.onFlagAllChanged(allIndicatorsAvailable) } } } // TODO(b/168209929) Uncomment // if (properties.keyset.contains(MIC_CAMERA)) { if (properties.keyset.contains(MIC_CAMERA)) { // micCameraAvailable = properties.getBoolean(MIC_CAMERA, DEFAULT_MIC_CAMERA) micCameraAvailable = properties.getBoolean(MIC_CAMERA, DEFAULT_MIC_CAMERA) // callbacks.forEach { it.get()?.onFlagMicCameraChanged(micCameraAvailable) } callbacks.forEach { it.get()?.onFlagMicCameraChanged(micCameraAvailable) } // } } if (properties.keyset.contains(LOCATION)) { if (properties.keyset.contains(LOCATION)) { locationAvailable = properties.getBoolean(LOCATION, DEFAULT_LOCATION) locationAvailable = properties.getBoolean(LOCATION, DEFAULT_LOCATION) callbacks.forEach { it.get()?.onFlagLocationChanged(locationAvailable) } callbacks.forEach { it.get()?.onFlagLocationChanged(locationAvailable) } Loading packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerFlagsTest.kt +0 −8 Original line number Original line Diff line number Diff line Loading @@ -32,7 +32,6 @@ import com.android.systemui.util.time.FakeSystemClock import org.junit.Assert.assertFalse import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Before import org.junit.Ignore import org.junit.Test import org.junit.Test import org.junit.runner.RunWith import org.junit.runner.RunWith import org.mockito.ArgumentCaptor import org.mockito.ArgumentCaptor Loading Loading @@ -107,7 +106,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testMicCameraChanged() { fun testMicCameraChanged() { changeMicCamera(false) // default is true changeMicCamera(false) // default is true executor.runAllReady() executor.runAllReady() Loading Loading @@ -140,7 +138,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testBothChanged() { fun testBothChanged() { changeAll(true) changeAll(true) changeMicCamera(false) changeMicCamera(false) Loading @@ -162,7 +159,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testMicCamera_listening() { fun testMicCamera_listening() { changeMicCamera(true) changeMicCamera(true) executor.runAllReady() executor.runAllReady() Loading @@ -179,7 +175,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testAllFalse_notListening() { fun testAllFalse_notListening() { changeAll(true) changeAll(true) executor.runAllReady() executor.runAllReady() Loading @@ -191,7 +186,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testSomeListening_stillListening() { fun testSomeListening_stillListening() { // Mic and camera are true by default // Mic and camera are true by default changeAll(true) changeAll(true) Loading @@ -203,7 +197,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testAllDeleted_micCameraFalse_stopListening() { fun testAllDeleted_micCameraFalse_stopListening() { changeMicCamera(false) changeMicCamera(false) changeAll(true) changeAll(true) Loading @@ -215,7 +208,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testMicDeleted_stillListening() { fun testMicDeleted_stillListening() { changeMicCamera(true) changeMicCamera(true) executor.runAllReady() executor.runAllReady() Loading Loading
packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt +8 −7 Original line number Original line Diff line number Diff line Loading @@ -88,9 +88,9 @@ class PrivacyItemController @Inject constructor( ALL_INDICATORS, DEFAULT_ALL_INDICATORS) ALL_INDICATORS, DEFAULT_ALL_INDICATORS) } } // TODO(b/168209929) Remove hardcode private fun isMicCameraEnabled(): Boolean { private fun isMicCameraEnabled(): Boolean { return true return deviceConfigProxy.getBoolean(DeviceConfig.NAMESPACE_PRIVACY, MIC_CAMERA, DEFAULT_MIC_CAMERA) } } private fun isLocationEnabled(): Boolean { private fun isLocationEnabled(): Boolean { Loading Loading @@ -140,11 +140,12 @@ class PrivacyItemController @Inject constructor( DEFAULT_ALL_INDICATORS) DEFAULT_ALL_INDICATORS) callbacks.forEach { it.get()?.onFlagAllChanged(allIndicatorsAvailable) } callbacks.forEach { it.get()?.onFlagAllChanged(allIndicatorsAvailable) } } } // TODO(b/168209929) Uncomment // if (properties.keyset.contains(MIC_CAMERA)) { if (properties.keyset.contains(MIC_CAMERA)) { // micCameraAvailable = properties.getBoolean(MIC_CAMERA, DEFAULT_MIC_CAMERA) micCameraAvailable = properties.getBoolean(MIC_CAMERA, DEFAULT_MIC_CAMERA) // callbacks.forEach { it.get()?.onFlagMicCameraChanged(micCameraAvailable) } callbacks.forEach { it.get()?.onFlagMicCameraChanged(micCameraAvailable) } // } } if (properties.keyset.contains(LOCATION)) { if (properties.keyset.contains(LOCATION)) { locationAvailable = properties.getBoolean(LOCATION, DEFAULT_LOCATION) locationAvailable = properties.getBoolean(LOCATION, DEFAULT_LOCATION) callbacks.forEach { it.get()?.onFlagLocationChanged(locationAvailable) } callbacks.forEach { it.get()?.onFlagLocationChanged(locationAvailable) } Loading
packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerFlagsTest.kt +0 −8 Original line number Original line Diff line number Diff line Loading @@ -32,7 +32,6 @@ import com.android.systemui.util.time.FakeSystemClock import org.junit.Assert.assertFalse import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Before import org.junit.Ignore import org.junit.Test import org.junit.Test import org.junit.runner.RunWith import org.junit.runner.RunWith import org.mockito.ArgumentCaptor import org.mockito.ArgumentCaptor Loading Loading @@ -107,7 +106,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testMicCameraChanged() { fun testMicCameraChanged() { changeMicCamera(false) // default is true changeMicCamera(false) // default is true executor.runAllReady() executor.runAllReady() Loading Loading @@ -140,7 +138,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testBothChanged() { fun testBothChanged() { changeAll(true) changeAll(true) changeMicCamera(false) changeMicCamera(false) Loading @@ -162,7 +159,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testMicCamera_listening() { fun testMicCamera_listening() { changeMicCamera(true) changeMicCamera(true) executor.runAllReady() executor.runAllReady() Loading @@ -179,7 +175,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testAllFalse_notListening() { fun testAllFalse_notListening() { changeAll(true) changeAll(true) executor.runAllReady() executor.runAllReady() Loading @@ -191,7 +186,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testSomeListening_stillListening() { fun testSomeListening_stillListening() { // Mic and camera are true by default // Mic and camera are true by default changeAll(true) changeAll(true) Loading @@ -203,7 +197,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testAllDeleted_micCameraFalse_stopListening() { fun testAllDeleted_micCameraFalse_stopListening() { changeMicCamera(false) changeMicCamera(false) changeAll(true) changeAll(true) Loading @@ -215,7 +208,6 @@ class PrivacyItemControllerFlagsTest : SysuiTestCase() { } } @Test @Test @Ignore // TODO(b/168209929) fun testMicDeleted_stillListening() { fun testMicDeleted_stillListening() { changeMicCamera(true) changeMicCamera(true) executor.runAllReady() executor.runAllReady() Loading