From fcda354146e770fa00678e1114d9ed58834947ef Mon Sep 17 00:00:00 2001 From: Beverly Date: Fri, 14 May 2021 11:41:22 -0400 Subject: [PATCH] Show alt auth bouncer before input bouncer When expanding a notification, show the alt auth bouncer before the input (pin/password/pattern) bouncer. Test: manual Fixes: 188154723 Change-Id: I7343aee221b962cc1f6cf683b777662f07206c02 --- .../systemui/statusbar/phone/StatusBar.java | 2 +- .../phone/StatusBarKeyguardViewManager.java | 22 ++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) 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 ec012bfde9b8c..9c6d6238d4067 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -3706,7 +3706,7 @@ public class StatusBar extends SystemUI implements DemoMode, private void showBouncerIfKeyguard() { if ((mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED) && !mKeyguardViewMediator.isHiding()) { - mStatusBarKeyguardViewManager.showBouncer(true /* scrimmed */); + mStatusBarKeyguardViewManager.showGenericBouncer(true /* scrimmed */); } } 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 41bd71015f80c..91d1bd73a403a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -365,6 +365,26 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb return false; } + /** + * If applicable, shows the alternate authentication bouncer. Else, shows the input + * (pin/password/pattern) bouncer. + * @param scrimmed true when the input bouncer should show scrimmed, false when the user will be + * dragging it and translation should be deferred {@see KeyguardBouncer#show(boolean, boolean)} + */ + public void showGenericBouncer(boolean scrimmed) { + if (mAlternateAuthInterceptor != null) { + if (mAlternateAuthInterceptor.showAlternateAuthBouncer()) { + mStatusBar.updateScrimController(); + } + return; + } + + showBouncer(scrimmed); + } + + /** + * Hides the input bouncer (pin/password/pattern). + */ @VisibleForTesting void hideBouncer(boolean destroyView) { if (mBouncer == null) { @@ -380,7 +400,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } /** - * Shows the keyguard bouncer - the password challenge on the lock screen + * Shows the keyguard input bouncer - the password challenge on the lock screen * * @param scrimmed true when the bouncer should show scrimmed, false when the user will be * dragging it and translation should be deferred {@see KeyguardBouncer#show(boolean, boolean)}