diff options
author | Beverly <beverlyt@google.com> | 2021-09-16 09:10:38 -0400 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-09-23 02:46:13 +0000 |
commit | e000435d7fcafff54647ee6ddb1ee0387c7ebaaf (patch) | |
tree | c6585b6e70d89295f61f5e8cbbe4995965ed003a | |
parent | 4ca180d63469e1168325af91b729ed917930f027 (diff) | |
download | base-e000435d7fcafff54647ee6ddb1ee0387c7ebaaf.tar.gz |
NotificationShade should animate away on MODE_UNLOCK_COLLAPSING
Animate away the NotificationShade - this was mistakenly
removed in ag/14455725
Test: manual, atest BiometricsUnlockControllerTest
Fixes: 197271777
Change-Id: I2accd8bd8975b2d49c1dc91870b7cc8467c5139d
Merged-In: I2accd8bd8975b2d49c1dc91870b7cc8467c5139d
(cherry picked from commit c7df56736202318e3ea24264ba4fbb1b6b6bb965)
(cherry picked from commit 2be6cfe7282efe892a1b33180395ed4606797815)
2 files changed, 26 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java index 6e201048abdb..2c76cfeff733 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java @@ -116,7 +116,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp /** * Mode in which fingerprint unlocks the device or passive auth (ie face auth) unlocks the - * device while being requested when keyguard is occluded. + * device while being requested when keyguard is occluded or showing. */ public static final int MODE_UNLOCK_COLLAPSING = 5; @@ -425,6 +425,11 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp if (!wasDeviceInteractive) { mPendingShowBouncer = true; } else { + mShadeController.animateCollapsePanels( + CommandQueue.FLAG_EXCLUDE_NONE, + true /* force */, + false /* delayed */, + BIOMETRIC_COLLAPSE_SPEEDUP_FACTOR); mPendingShowBouncer = false; mKeyguardViewController.notifyKeyguardAuthenticated( false /* strongAuth */); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java index 60f0b68acac3..4276f7ce7b12 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java @@ -274,6 +274,26 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase { } @Test + public void onBiometricAuthenticated_onLockScreen() { + // GIVEN not dozing + when(mUpdateMonitor.isDeviceInteractive()).thenReturn(true); + + // WHEN we want to unlock collapse + mBiometricUnlockController.startWakeAndUnlock( + BiometricUnlockController.MODE_UNLOCK_COLLAPSING); + + // THEN we collpase the panels and notify authenticated + verify(mShadeController).animateCollapsePanels( + /* flags */ anyInt(), + /* force */ eq(true), + /* delayed */ eq(false), + /* speedUpFactor */ anyFloat() + ); + verify(mStatusBarKeyguardViewManager).notifyKeyguardAuthenticated( + /* strongAuth */ eq(false)); + } + + @Test public void onBiometricAuthenticated_whenFace_noBypass_encrypted_doNothing() { reset(mUpdateMonitor); mBiometricUnlockController.setKeyguardViewController(mStatusBarKeyguardViewManager); |