From 1529e019e1aae7f9db1c850d9940b01d4067d700 Mon Sep 17 00:00:00 2001 From: Christoph Studer Date: Thu, 31 Jul 2014 16:42:16 +0200 Subject: 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 --- .../src/com/android/systemui/statusbar/BaseStatusBar.java | 9 +++------ .../src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 8 -------- 2 files changed, 3 insertions(+), 14 deletions(-) (limited to 'packages') 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); -- cgit v1.1