From 3806c771336a378b650b2ec14aa1ae7e5927f137 Mon Sep 17 00:00:00 2001 From: Dan Sandler Date: Thu, 8 May 2014 14:52:10 -0400 Subject: Don't show notifications above FLAG_SHOW_WHEN_LOCKED windows. We need to hide the bouncer when the lockscreen is occluded by a show-when-locked window, but we also need to double-check any time the screen comes on in case the bouncer has been shown for some other reason since the occlusion originally happened. Bug: 14294001 Change-Id: Ief4ea8e39322d9c4b26ec217dbc14b6c6f16ad45 --- .../statusbar/phone/StatusBarKeyguardViewManager.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'packages/SystemUI/src') diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index e24ddd9..f24c1b6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -95,7 +95,9 @@ public class StatusBarKeyguardViewManager { } private void showBouncer() { - mBouncer.show(); + if (!mOccluded) { + mBouncer.show(); + } updateStates(); } @@ -103,7 +105,12 @@ public class StatusBarKeyguardViewManager { * Reset the state of the view. */ public void reset() { - showBouncerOrKeyguard(); + if (mOccluded) { + mPhoneStatusBar.hideKeyguard(); + mBouncer.hide(); + } else { + showBouncerOrKeyguard(); + } updateStates(); } @@ -114,6 +121,7 @@ public class StatusBarKeyguardViewManager { public void onScreenTurnedOn(final IKeyguardShowCallback callback) { mScreenOn = true; + reset(); if (callback != null) { callbackAfterDraw(callback); } @@ -147,7 +155,7 @@ public class StatusBarKeyguardViewManager { public void setOccluded(boolean occluded) { mOccluded = occluded; mStatusBarWindowManager.setKeyguardOccluded(occluded); - updateStates(); + reset(); } /** -- cgit v1.1