diff options
author | 2025-02-26 19:21:31 -0600 | |
---|---|---|
committer | 2025-03-03 13:51:20 -0800 | |
commit | ee7052c4b55a0fb2bf84895c39a735fb1437c275 (patch) | |
tree | 3eff71cdf2f1b965b76bebcfe4697b176d528cb0 /tests | |
parent | ee1394a4ae6a0df66f25d8cc2b8b59a54b98907b (diff) |
Remove explicit modification of privacy indicators flag
Android 16 introduces a new restriction that only allowlisted
DeviceConfig flags can be modified by the shell user. The
camera_mic_icons_enabled flag is not on the allowlist since it
was only intended to be used during the initial feature development
and should be enabled by default. This commit updates the test
that currently modifies this flag to only verify that the flag
is enabled.
Bug: 390242290
Flag: android.security.protect_device_config_flags
Relnote: N/A
Test: atest CtsPermissionUiTestCases:CameraMicIndicatorsPermissionTest
Change-Id: I11ed9c3b6c29a32557add30c5894e728ca9712f7
LOW_COVERAGE_REASON=TEST_ONLY
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cts/permissionui/src/android/permissionui/cts/CameraMicIndicatorsPermissionTest.kt | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tests/cts/permissionui/src/android/permissionui/cts/CameraMicIndicatorsPermissionTest.kt b/tests/cts/permissionui/src/android/permissionui/cts/CameraMicIndicatorsPermissionTest.kt index 798b1942f..e1cb76171 100644 --- a/tests/cts/permissionui/src/android/permissionui/cts/CameraMicIndicatorsPermissionTest.kt +++ b/tests/cts/permissionui/src/android/permissionui/cts/CameraMicIndicatorsPermissionTest.kt @@ -123,7 +123,6 @@ class CameraMicIndicatorsPermissionTest : StsExtraBusinessLogicTestCase { .toString() private val cameraLabel = originalCameraLabel.lowercase() private val micLabel = originalMicLabel.lowercase() - private var wasEnabled = false private var isScreenOn = false private var screenTimeoutBeforeTest: Long = 0L private lateinit var carMicPrivacyChipId: String @@ -181,7 +180,6 @@ class CameraMicIndicatorsPermissionTest : StsExtraBusinessLogicTestCase { isScreenOn = true } uiDevice.findObject(By.text("Close"))?.click() - wasEnabled = setIndicatorsEnabledStateIfNeeded(true) // If the change Id is not present, then isChangeEnabled will return true. To bypass this, // the change is set to "false" if present. assumeFalse( @@ -193,23 +191,6 @@ class CameraMicIndicatorsPermissionTest : StsExtraBusinessLogicTestCase { install() } - private fun setIndicatorsEnabledStateIfNeeded(shouldBeEnabled: Boolean): Boolean { - var currentlyEnabled = false - runWithShellPermissionIdentity { - currentlyEnabled = - DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PRIVACY, INDICATORS_FLAG, true) - if (currentlyEnabled != shouldBeEnabled) { - DeviceConfig.setProperty( - DeviceConfig.NAMESPACE_PRIVACY, - INDICATORS_FLAG, - shouldBeEnabled.toString(), - false, - ) - } - } - return currentlyEnabled - } - @After fun tearDown() { // Skip the tests as Camera and Mic are not supported for visible background users. @@ -225,9 +206,6 @@ class CameraMicIndicatorsPermissionTest : StsExtraBusinessLogicTestCase { { assertIndicatorsShown(false, false, false) }, AUTO_MIC_INDICATOR_DISMISSAL_TIMEOUT_MS, ) - if (!wasEnabled) { - setIndicatorsEnabledStateIfNeeded(false) - } runWithShellPermissionIdentity { Settings.System.putLong( context.contentResolver, |