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

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

Expose ZenMode kind (and simplify implicit mode creation in TestModeBuilder)

Bug: 379089451
Test: atest ZenModeSummaryHelperTest
Flag: android.app.modes_ui
Change-Id: I0b0f42a88eaf140e5e262a70bcbb1a91f1e6ebd4
parent 4ec85a58
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -204,6 +204,13 @@ public class TestModeBuilder {
        return this;
    }

    public TestModeBuilder implicitForPackage(String pkg) {
        setPackage(pkg);
        setId(ZenModeConfig.implicitRuleId(pkg));
        setName("Do Not Disturb (" + pkg + ")");
        return this;
    }

    public TestModeBuilder setActive(boolean active) {
        if (active) {
            mConfigZenRule.enabled = true;
+5 −0
Original line number Diff line number Diff line
@@ -207,6 +207,11 @@ public class ZenMode implements Parcelable {
        return Strings.nullToEmpty(mRule.getName());
    }

    @NonNull
    public Kind getKind() {
        return mKind;
    }

    @NonNull
    public Status getStatus() {
        return mStatus;