diff options
| author | 2024-10-02 19:09:30 +0000 | |
|---|---|---|
| committer | 2024-10-02 19:09:30 +0000 | |
| commit | 1c0e239e5a7fb97ae20e69bb50a85f9932ab5fc5 (patch) | |
| tree | 7307005e7205d80c7e23c2f0e16de8e48a809a15 | |
| parent | e5f0f5203571d95def79bbe751518fd0f9ea5cca (diff) | |
Revert "Update content description of active mode icon in Status Bar"
Revert submission 29669825-active-mode-a11y
Reason for revert: Droidmonitor created revert due to b/371016697. Will be verifying through ABTD before submission.
Reverted changes: /q/submissionid:29669825-active-mode-a11y
Change-Id: I01cc21a61393343314b3699c69b2d5e05bfb37bc
3 files changed, 8 insertions, 15 deletions
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index f0f1723515b4..24b657943e37 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -1817,12 +1817,6 @@ <!-- Name of the alarm status bar icon. --> <string name="status_bar_alarm">Alarm</string> - <!-- Format string for the content description of the icon that indicates that a Mode is on. - For example, if the mode name is Bedtime, this will be "Bedtime is on". This content - description will be associated to the mode icon in status bar, smartspace, and everyone else - where it might be displayed without text. [CHAR LIMIT=NONE] --> - <string name="active_mode_content_description"><xliff:g id="modeName" example="Do Not Disturb">%1$s</xliff:g> is on</string> - <!-- Wallet strings --> <!-- Wallet empty state, title [CHAR LIMIT=32] --> <string name="wallet_title">Wallet</string> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java index f8eae3607f6a..8c0353813ec6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java @@ -411,8 +411,7 @@ public class PhoneStatusBarPolicy mainActiveMode.getIcon().key().resPackage(), mainActiveMode.getIcon().key().resId(), mainActiveMode.getIcon().drawable(), - mResources.getString(R.string.active_mode_content_description, - mainActiveMode.getName()), + mainActiveMode.getName(), StatusBarIcon.Shape.FIXED_SPACE); } if (visible != mZenVisible) { diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicyTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicyTest.kt index 83600422bda4..2ed34735db1f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicyTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicyTest.kt @@ -160,11 +160,11 @@ class PhoneStatusBarPolicyTest : SysuiTestCase() { testableLooper = TestableLooper.get(this) context.orCreateTestableResources.addOverride( com.android.internal.R.string.status_bar_alarm_clock, - ALARM_SLOT, + ALARM_SLOT ) context.orCreateTestableResources.addOverride( com.android.internal.R.string.status_bar_managed_profile, - MANAGED_PROFILE_SLOT, + MANAGED_PROFILE_SLOT ) whenever(devicePolicyManager.resources).thenReturn(devicePolicyManagerResources) whenever(devicePolicyManagerResources.getString(anyString(), any())).thenReturn("") @@ -430,8 +430,8 @@ class PhoneStatusBarPolicyTest : SysuiTestCase() { eq(mContext.packageName), eq(android.R.drawable.ic_lock_lock), any(), // non-null - eq("Bedtime Mode is on"), - eq(StatusBarIcon.Shape.FIXED_SPACE), + eq("Bedtime Mode"), + eq(StatusBarIcon.Shape.FIXED_SPACE) ) zenModeRepository.deactivateMode("bedtime") @@ -443,8 +443,8 @@ class PhoneStatusBarPolicyTest : SysuiTestCase() { eq(null), eq(android.R.drawable.ic_media_play), any(), // non-null - eq("Other Mode is on"), - eq(StatusBarIcon.Shape.FIXED_SPACE), + eq("Other Mode"), + eq(StatusBarIcon.Shape.FIXED_SPACE) ) zenModeRepository.deactivateMode("other") @@ -538,7 +538,7 @@ class PhoneStatusBarPolicyTest : SysuiTestCase() { privacyLogger, fakeConnectedDisplayStateProvider, kosmos.zenModeInteractor, - JavaAdapter(testScope.backgroundScope), + JavaAdapter(testScope.backgroundScope) ) } |