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

Commit fe477ebe authored by Matías Hernández's avatar Matías Hernández
Browse files

Use the DND icon as the default icon for implicit modes

Bug: 361597532
Test: atest ZenModeTest
Flag: android.app.modes_ui
Change-Id: Ic2454b1f26f4722c1ca15f36728a3c07f33a702d
parent 61614716
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ class ZenIconKeys {
     * chosen one via Settings).
     */
    static final ZenIcon.Key IMPLICIT_MODE_DEFAULT = ZenIcon.Key.forSystemResource(
            R.drawable.ic_zen_mode_type_unknown);
            R.drawable.ic_zen_mode_type_special_dnd);

    private static final ImmutableMap<Integer, ZenIcon.Key> TYPE_DEFAULTS = ImmutableMap.of(
            AutomaticZenRule.TYPE_UNKNOWN,
+2 −2
Original line number Diff line number Diff line
@@ -359,7 +359,7 @@ public class ZenModeTest {
    }

    @Test
    public void getIconKey_implicitModeWithoutCustomIcon_isSpecialIcon() {
    public void getIconKey_implicitModeWithoutCustomIcon_isDndIcon() {
        ZenMode mode = new TestModeBuilder()
                .setId(ZenModeConfig.implicitRuleId("some.package"))
                .setPackage("some_package")
@@ -370,7 +370,7 @@ public class ZenModeTest {

        assertThat(iconKey.resPackage()).isNull();
        assertThat(iconKey.resId()).isEqualTo(
                com.android.internal.R.drawable.ic_zen_mode_type_unknown);
                com.android.internal.R.drawable.ic_zen_mode_type_special_dnd);
    }

    private static void assertUnparceledIsEqualToOriginal(String type, ZenMode original) {