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

Commit df5c89ca authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Expose ZenMode kind (and simplify implicit mode creation in TestModeBuilder)" into main

parents 1ef75f49 5c30e082
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;