am 83ddb523: Merge "Disable heads up when DISABLE_NOTIFICATION_ALERT" into lmp-dev
* commit '83ddb523cb888cc9f2ac0d33d086f939af2adef0': Disable heads up when DISABLE_NOTIFICATION_ALERT
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user