diff options
| author | 2022-05-26 15:09:41 +0000 | |
|---|---|---|
| committer | 2022-05-26 15:09:41 +0000 | |
| commit | dbb2c0886d3657c6fba6c729d6993c17d0dcfe3d (patch) | |
| tree | 844a48685a2eb8a248904bd7d9b61ebcc99db4e5 | |
| parent | 156254df35c988df930b8e7f71abeb648e6e3583 (diff) | |
| parent | 39f79b0fada8a3f87933ebcc132e4b95382c41e3 (diff) | |
Merge "Revert "Run unlock animation on MODE_ONLY_WAKE"" into tm-dev am: 39f79b0fad
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18610066
Change-Id: Idc35d94562677c77f0fa5044acb6b78779018bf9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
3 files changed, 5 insertions, 27 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index e0f9d3cb54b6..e379d766f0ca 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -2816,12 +2816,9 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, } } - /** - * Receive a wake event from outside this class (most likely bio auth). - */ - public void onWake(boolean withUnlock) { - Trace.beginSection("KeyguardViewMediator#onWake"); - mWakeAndUnlocking = withUnlock; + public void onWakeAndUnlocking() { + Trace.beginSection("KeyguardViewMediator#onWakeAndUnlocking"); + mWakeAndUnlocking = true; keyguardDone(); Trace.endSection(); 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 f624a8318e26..9eb5f792011f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java @@ -492,12 +492,10 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp mUpdateMonitor.awakenFromDream(); } mNotificationShadeWindowController.setNotificationShadeFocusable(false); - mKeyguardViewMediator.onWake(true /* withUnlock */); + mKeyguardViewMediator.onWakeAndUnlocking(); Trace.endSection(); break; case MODE_ONLY_WAKE: - mKeyguardViewMediator.onWake(false /* withUnlock */); - break; case MODE_NONE: break; } 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 8951a7c631c2..aa54711096ea 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 @@ -179,29 +179,12 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase { mBiometricUnlockController.onBiometricAuthenticated(UserHandle.USER_CURRENT, BiometricSourceType.FINGERPRINT, true /* isStrongBiometric */); - verify(mKeyguardViewMediator).onWake(true /* withUnlock */); + verify(mKeyguardViewMediator).onWakeAndUnlocking(); assertThat(mBiometricUnlockController.getMode()) .isEqualTo(BiometricUnlockController.MODE_WAKE_AND_UNLOCK_PULSING); } @Test - public void onBiometricAuthenticated_whenFingerprintAndInteractive_wakeWithoutUnlock() { - reset(mUpdateMonitor); - reset(mStatusBarKeyguardViewManager); - when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(false); - when(mUpdateMonitor.isUnlockingWithBiometricAllowed(anyBoolean())).thenReturn(true); - when(mDozeScrimController.isPulsing()).thenReturn(false); - // the value of isStrongBiometric doesn't matter here since we only care about the returned - // value of isUnlockingWithBiometricAllowed() - mBiometricUnlockController.onBiometricAuthenticated(UserHandle.USER_CURRENT, - BiometricSourceType.FINGERPRINT, true /* isStrongBiometric */); - - verify(mKeyguardViewMediator).onWake(false /* withUnlock */); - assertThat(mBiometricUnlockController.getMode()) - .isEqualTo(BiometricUnlockController.MODE_ONLY_WAKE); - } - - @Test public void onBiometricAuthenticated_whenFingerprint_notifyKeyguardAuthenticated() { when(mUpdateMonitor.isUnlockingWithBiometricAllowed(anyBoolean())).thenReturn(true); // the value of isStrongBiometric doesn't matter here since we only care about the returned |