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

Commit 966e2583 authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Disable heads up when DISABLE_NOTIFICATION_ALERT" into lmp-dev

parents 9cf1f377 f701954d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ public abstract class BaseStatusBar extends SystemUI implements
    private Locale mLocale;
    protected boolean mUseHeadsUp = false;
    protected boolean mHeadsUpTicker = false;
    protected boolean mDisableNotificationAlerts = false;

    protected IDreamManager mDreamManager;
    PowerManager mPowerManager;
+8 −1
Original line number Diff line number Diff line
@@ -367,7 +367,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        @Override
        public void onChange(boolean selfChange) {
            boolean wasUsing = mUseHeadsUp;
            mUseHeadsUp = ENABLE_HEADS_UP && Settings.Global.HEADS_UP_OFF != Settings.Global.getInt(
            mUseHeadsUp = ENABLE_HEADS_UP && !mDisableNotificationAlerts
                    && Settings.Global.HEADS_UP_OFF != Settings.Global.getInt(
                    mContext.getContentResolver(), Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED,
                    Settings.Global.HEADS_UP_OFF);
            mHeadsUpTicker = mUseHeadsUp && 0 != Settings.Global.getInt(
@@ -1930,6 +1931,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
                animateStatusBarShow(mNotificationIconArea, animate);
            }
        }

        if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0) {
            mDisableNotificationAlerts =
                    (state & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0;
            mHeadsUpObserver.onChange(true);
        }
    }

    /**