diff options
| author | 2021-12-09 19:39:31 +0000 | |
|---|---|---|
| committer | 2021-12-09 19:39:31 +0000 | |
| commit | e3a0a01c75d45ada5ec00b6f90a7c5d8f91e15d9 (patch) | |
| tree | 55249cf201654742750832c14c051229533f2864 | |
| parent | 01a6d8d048fde6298c6f8259c90d802063ccbf6e (diff) | |
| parent | c0ed5e9f510effcc5dab60c3b8f32b105148f537 (diff) | |
Merge "Update to 2 failed udfps attempts to show bouncer" into sc-v2-dev am: 6445db669e am: c0ed5e9f51
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16422817
Change-Id: I3dc50d3aec06e467ce859f63b26fd1ac9ee64b26
2 files changed, 4 insertions, 5 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 aa3b3e12b8f8..ad1c23283912 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java @@ -74,7 +74,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp private static final long BIOMETRIC_WAKELOCK_TIMEOUT_MS = 15 * 1000; private static final String BIOMETRIC_WAKE_LOCK_NAME = "wake-and-unlock:wakelock"; private static final UiEventLogger UI_EVENT_LOGGER = new UiEventLoggerImpl(); - private static final int FP_ATTEMPTS_BEFORE_SHOW_BOUNCER = 3; + private static final int FP_ATTEMPTS_BEFORE_SHOW_BOUNCER = 2; @IntDef(prefix = { "MODE_" }, value = { MODE_NONE, 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 07debe68e224..c3349f1d70f4 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 @@ -381,16 +381,15 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase { } @Test - public void onUdfpsConsecutivelyFailedThreeTimes_showBouncer() { + public void onUdfpsConsecutivelyFailedTwoTimes_showBouncer() { // GIVEN UDFPS is supported when(mUpdateMonitor.isUdfpsSupported()).thenReturn(true); - // WHEN udfps fails twice - then don't show the bouncer - mBiometricUnlockController.onBiometricAuthFailed(BiometricSourceType.FINGERPRINT); + // WHEN udfps fails once - then don't show the bouncer mBiometricUnlockController.onBiometricAuthFailed(BiometricSourceType.FINGERPRINT); verify(mStatusBarKeyguardViewManager, never()).showBouncer(anyBoolean()); - // WHEN udfps fails the third time + // WHEN udfps fails the second time mBiometricUnlockController.onBiometricAuthFailed(BiometricSourceType.FINGERPRINT); // THEN show the bouncer |