diff options
author | Christoph Studer <chstuder@google.com> | 2014-07-31 16:42:16 +0200 |
---|---|---|
committer | Christoph Studer <chstuder@google.com> | 2014-07-31 16:42:16 +0200 |
commit | 1529e019e1aae7f9db1c850d9940b01d4067d700 (patch) | |
tree | b815e5e74ef1dec21f67f42fe5d2ad2003a2da47 /packages | |
parent | 5e8cb22e609bf36ada35cd99c6d3ac51abd6b8ab (diff) | |
download | frameworks_base-1529e019e1aae7f9db1c850d9940b01d4067d700.zip frameworks_base-1529e019e1aae7f9db1c850d9940b01d4067d700.tar.gz frameworks_base-1529e019e1aae7f9db1c850d9940b01d4067d700.tar.bz2 |
SysUI: Respect "no notifs on lockscreen" setting
Setting the stack scroller to INVISIBLE didn't work. Now we just consider
all notifs as "not visible on lockscreen" instead.
Bug: 16650758
Change-Id: I4259c6ec2f663fc988377b8d5a259d6a0f827178
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java | 9 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 8 |
2 files changed, 3 insertions, 14 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index 8eca0ae..4b037d2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -220,7 +220,7 @@ public abstract class BaseStatusBar extends SystemUI implements setZenMode(mode); final boolean show = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS, 1) != 0; - setShowLockscreenNotifications(show); + mShowLockscreenNotifications = show; } }; @@ -1423,7 +1423,8 @@ public abstract class BaseStatusBar extends SystemUI implements } private boolean shouldShowOnKeyguard(StatusBarNotification sbn) { - return sbn.getNotification().priority >= Notification.PRIORITY_LOW; + return mShowLockscreenNotifications && + sbn.getNotification().priority >= Notification.PRIORITY_LOW; } protected void setZenMode(int mode) { @@ -1432,10 +1433,6 @@ public abstract class BaseStatusBar extends SystemUI implements updateNotifications(); } - protected void setShowLockscreenNotifications(boolean show) { - mShowLockscreenNotifications = show; - } - protected abstract void haltTicker(); protected abstract void setAreThereNotifications(); protected abstract void updateNotifications(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 20a4092..c9f9e48 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -534,12 +534,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, }; @Override - protected void setShowLockscreenNotifications(boolean show) { - super.setShowLockscreenNotifications(show); - updateStackScrollerState(); - } - - @Override public void start() { mDisplay = ((WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE)) .getDefaultDisplay(); @@ -3421,8 +3415,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, if (mStackScroller == null) return; boolean onKeyguard = mState == StatusBarState.KEYGUARD; mStackScroller.setDimmed(onKeyguard, false /* animate */); - mStackScroller.setVisibility(!mShowLockscreenNotifications && onKeyguard - ? View.INVISIBLE : View.VISIBLE); mStackScroller.setExpandingEnabled(!onKeyguard); ActivatableNotificationView activatedChild = mStackScroller.getActivatedChild(); mStackScroller.setActivatedChild(null); |