From fc8beb0ae1698abd27d88e84e7b60af86366ffdd Mon Sep 17 00:00:00 2001 From: Lucas Silva Date: Tue, 29 Mar 2022 16:45:20 -0400 Subject: [PATCH] Prevent the bouncer from showing over dreams when swiping down the shade. Currently, since the bouncer and notification shade utilize the same panel, we see the bouncer appear when swiping down the shade. With this fix, we only allow the bouncer to expand if the shade is not expanded. Bug: 226419441 Bug: 224996347 Test: locally on device Change-Id: I6f702cc1d262bb3a0397fadf7f14b8f3c683900d --- .../statusbar/phone/StatusBarKeyguardViewManager.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 a1cbba47e822..00d6f3a15c0f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -355,6 +355,12 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb @Override public void onPanelExpansionChanged(float fraction, boolean expanded, boolean tracking) { + // Avoid having the shade and the bouncer open at the same time over a dream. + final boolean hideBouncerOverDream = + mDreamOverlayStateController.isOverlayActive() + && (mNotificationPanelViewController.isExpanded() + || mNotificationPanelViewController.isExpanding()); + // We don't want to translate the bounce when: // • Keyguard is occluded, because we're in a FLAG_SHOW_WHEN_LOCKED activity and need to // conserve the original animation. @@ -371,7 +377,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb return; } else if (bouncerNeedsScrimming()) { mBouncer.setExpansion(KeyguardBouncer.EXPANSION_VISIBLE); - } else if (mShowing) { + } else if (mShowing && !hideBouncerOverDream) { if (!isWakeAndUnlocking() && !mCentralSurfaces.isInLaunchTransition() && !isUnlockCollapsing()) {