summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2014-05-29 22:03:26 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-29 22:03:26 +0000
commitf68e9d834cbc67dd409076f4d574a55f74d566e2 (patch)
tree8d4a8840893143a3e13850a8dd0a82095b006fba /packages
parent457fa277049578aa6195e8d784f3c33b384b96e6 (diff)
parent4b3bda22251c09276a967091e9e364efadd8f0fd (diff)
downloadframeworks_base-f68e9d834cbc67dd409076f4d574a55f74d566e2.zip
frameworks_base-f68e9d834cbc67dd409076f4d574a55f74d566e2.tar.gz
frameworks_base-f68e9d834cbc67dd409076f4d574a55f74d566e2.tar.bz2
Merge "Honor Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS." into lmp-preview-dev
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java9
2 files changed, 20 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index fbe76f9..21b41c7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -182,6 +182,7 @@ public abstract class BaseStatusBar extends SystemUI implements
*/
protected int mState;
protected boolean mBouncerShowing;
+ protected boolean mShowLockscreenNotifications;
protected NotificationOverflowContainer mKeyguardIconOverflowContainer;
@@ -201,6 +202,9 @@ public abstract class BaseStatusBar extends SystemUI implements
final int mode = Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.ZEN_MODE, Settings.Global.ZEN_MODE_OFF);
setZenMode(mode);
+ final boolean show = Settings.Global.getInt(mContext.getContentResolver(),
+ Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS, 1) != 0;
+ setShowLockscreenNotifications(show);
}
};
@@ -362,6 +366,9 @@ public abstract class BaseStatusBar extends SystemUI implements
mContext.getContentResolver().registerContentObserver(
Settings.Global.getUriFor(Settings.Global.ZEN_MODE), false,
mSettingsObserver);
+ mContext.getContentResolver().registerContentObserver(
+ Settings.Global.getUriFor(Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS), false,
+ mSettingsObserver);
mContext.getContentResolver().registerContentObserver(
Settings.Secure.getUriFor(Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS),
@@ -1247,6 +1254,10 @@ 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 5dcd61c..0e5b7e1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -505,6 +505,12 @@ 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();
@@ -2851,7 +2857,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
public void updateStackScrollerState() {
+ if (mStackScroller == null) return;
mStackScroller.setDimmed(mState == StatusBarState.KEYGUARD, false /* animate */);
+ mStackScroller.setVisibility(!mShowLockscreenNotifications && mState == StatusBarState.KEYGUARD
+ ? View.INVISIBLE : View.VISIBLE);
}
public void userActivity() {