diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index 5d8d01ce08221..59e7005e7daf4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -5797,15 +5797,18 @@ public class StatusBar extends SystemUI implements DemoMode, boolean handled = superOnClickHandler(view, pendingIntent, fillInIntent); // close the shade if it was open - if (handled) { + if (handled && !mNotificationPanel.isFullyCollapsed()) { animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL, true /* force */); visibilityChanged(false); mAssistManager.hideAssist(); + + // Wait for activity start. + return true; + } else { + return false; } - // Wait for activity start. - return handled; } }, afterKeyguardGone); return true; @@ -6855,12 +6858,16 @@ public class StatusBar extends SystemUI implements DemoMode, } }.start(); - // close the shade if it was open - animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL, - true /* force */, true /* delayed */); - visibilityChanged(false); + if (!mNotificationPanel.isFullyCollapsed()) { + // close the shade if it was open + animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL, + true /* force */, true /* delayed */); + visibilityChanged(false); - return true; + return true; + } else { + return false; + } } }, afterKeyguardGone); } @@ -7012,12 +7019,16 @@ public class StatusBar extends SystemUI implements DemoMode, new Thread(runnable).start(); } - // close the shade if it was open - animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL, - true /* force */, true /* delayed */); - visibilityChanged(false); + if (!mNotificationPanel.isFullyCollapsed()) { + // close the shade if it was open + animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL, + true /* force */, true /* delayed */); + visibilityChanged(false); - return true; + return true; + } else { + return false; + } } }, afterKeyguardGone); } 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 7e61a80de7482..6f710da6fe7d3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -226,7 +226,9 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb if (mOccluded && !mDozing) { mStatusBar.hideKeyguard(); mStatusBar.stopWaitingForKeyguardExit(); - hideBouncer(false /* destroyView */); + if (hideBouncerWhenShowing || mBouncer.needsFullscreenBouncer()) { + hideBouncer(false /* destroyView */); + } } else { showBouncerOrKeyguard(hideBouncerWhenShowing); }