Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47936ee8 authored by Matías Hernández's avatar Matías Hernández Committed by Android (Google) Code Review
Browse files

Revert^2 "Update content description of active mode icon in Status Bar"

This reverts commit 1c0e239e.

Reason for revert: Rolling forward with fixed test

Change-Id: I16ed6768de6c5e68053452ed535c09492699a494
parent 1c0e239e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1817,6 +1817,12 @@
    <!-- 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>
+2 −1
Original line number Diff line number Diff line
@@ -411,7 +411,8 @@ public class PhoneStatusBarPolicy
                    mainActiveMode.getIcon().key().resPackage(),
                    mainActiveMode.getIcon().key().resId(),
                    mainActiveMode.getIcon().drawable(),
                    mainActiveMode.getName(),
                    mResources.getString(R.string.active_mode_content_description,
                            mainActiveMode.getName()),
                    StatusBarIcon.Shape.FIXED_SPACE);
        }
        if (visible != mZenVisible) {
+7 −7
Original line number Diff line number Diff line
@@ -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"),
                    eq(StatusBarIcon.Shape.FIXED_SPACE)
                    eq("Bedtime Mode is on"),
                    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"),
                    eq(StatusBarIcon.Shape.FIXED_SPACE)
                    eq("Other Mode is on"),
                    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),
        )
    }