From 776d4ec45162e693a68e3d3e64654c62df169205 Mon Sep 17 00:00:00 2001 From: Flare Chiu Date: Thu, 26 May 2022 03:24:59 +0000 Subject: [PATCH] Revert "Run unlock animation on MODE_ONLY_WAKE" This reverts commit 5481291dca0fa77dee70ec097d305130181facb1. Reason for revert: DroidMonitor: Potential culprit for Bug 233958841 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Change-Id: I4f28fac9784da045866bb592c163f834c0dc856b --- .../keyguard/KeyguardViewMediator.java | 9 +++------ .../phone/BiometricUnlockController.java | 4 +--- .../phone/BiometricsUnlockControllerTest.java | 19 +------------------ 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 e0f9d3cb54b6f..e379d766f0caf 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 32803feea42a0..c1869e0575ed6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java @@ -500,12 +500,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 5c60c70f6d5ba..d6a2f0f22e5a9 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 @@ -180,28 +180,11 @@ 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);