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

Commit dfae159b authored by John Spurlock's avatar John Spurlock Committed by Android (Google) Code Review
Browse files

Merge "Introduce zen mode."

parents fef54f9a e677d711
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -6081,6 +6081,24 @@ public final class Settings {
        public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS =
                "lock_screen_show_notifications";

        /**
         * Defines global zen mode.  One of ZEN_MODE_OFF, ZEN_MODE_LIMITED, ZEN_MODE_FULL.
         *
         * @hide
         */
        public static final String ZEN_MODE = "zen_mode";

        /** @hide */ public static final int ZEN_MODE_OFF = 0;
        /** @hide */ public static final int ZEN_MODE_LIMITED = 1;
        /** @hide */ public static final int ZEN_MODE_FULL = 2;

        /** @hide */ public static String zenModeToString(int mode) {
            if (mode == ZEN_MODE_OFF) return "ZEN_MODE_OFF";
            if (mode == ZEN_MODE_LIMITED) return "ZEN_MODE_LIMITED";
            if (mode == ZEN_MODE_FULL) return "ZEN_MODE_FULL";
            throw new IllegalArgumentException("Invalid zen mode: " + mode);
        }

        /**
         * Settings to backup. This is here so that it's in the same place as the settings
         * keys and easy to update.
+408 B
Loading image diff...
+745 B
Loading image diff...
+614 B
Loading image diff...
+293 B
Loading image diff...
Loading