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

Commit eeb397b7 authored by John Spurlock's avatar John Spurlock
Browse files

Zen mode updates.

 - Now only two modes, no more ZEN_MODE_FULL.
 - Alarms are allowed by default.
 - Interstitial dialog cleanup to follow current UX.

Change-Id: I8e4c8f64854dabfef69ad33b3eb35bee07e55ef7
parent c7627537
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -6098,21 +6098,18 @@ public final class Settings {
                "lock_screen_show_notifications";

        /**
         * Defines global zen mode.  One of ZEN_MODE_OFF, ZEN_MODE_LIMITED, ZEN_MODE_FULL.
         * Defines global zen mode.  ZEN_MODE_OFF or ZEN_MODE_ON.
         *
         * @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 final int ZEN_MODE_ON = 1;

        /** @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);
            return "ZEN_MODE_ON";
        }

        /**
+3 −0
Original line number Diff line number Diff line
@@ -40,4 +40,7 @@

    <!-- The fixed height of each tile -->
    <dimen name="quick_settings_cell_height">100dp</dimen>

    <!-- Width of the zen mode interstitial dialog. -->
    <dimen name="zen_mode_dialog_width">384dp</dimen>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -51,4 +51,7 @@
    <!-- How far to slide the panel out when you touch it -->
    <!-- On tablets this is just the close_handle_height -->
    <dimen name="peek_height">@dimen/close_handle_height</dimen>

    <!-- Width of the zen mode interstitial dialog. -->
    <dimen name="zen_mode_dialog_width">384dp</dimen>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -232,4 +232,7 @@

    <!-- The size of the icon in the recents task view. -->
    <dimen name="recents_task_view_icon_size">60dp</dimen>

    <!-- Width of the zen mode interstitial dialog.  Defaults to MATCH_PARENT. -->
    <dimen name="zen_mode_dialog_width">-1px</dimen>
</resources>
+1 −2
Original line number Diff line number Diff line
@@ -1260,8 +1260,7 @@ public abstract class BaseStatusBar extends SystemUI implements
    }

    private boolean shouldIntercept() {
        return mZenMode == Settings.Global.ZEN_MODE_LIMITED
                || mZenMode == Settings.Global.ZEN_MODE_FULL;
        return mZenMode != Settings.Global.ZEN_MODE_OFF;
    }

    protected boolean shouldIntercept(Notification n) {
Loading