diff options
| author | 2021-10-08 10:18:25 -0400 | |
|---|---|---|
| committer | 2021-10-08 16:29:57 +0000 | |
| commit | 7cbb52f06dec892a2e5dcefaaf3c7bd9b26d0d28 (patch) | |
| tree | 4b4de9d5bf549d0e22535eb5e0f8ff768011bb01 | |
| parent | a9129a5f9dba94636fd8c749644d5ad7e66f58a2 (diff) | |
Update face lockout co-ex message
If face auth is locked out and fp is running, show "Use fingerprint to
unlock" instead of the "Not recognized. Use fingerprint instead" message.
The latter message didn't make sense because face auth didn't actually
run since face auth was locked out (too many attempts).
Test: manual
Fixes: 195895003
Change-Id: Ie3d9101e7c3ddd21f5043f5aad4a51831b3c6592
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 8a397199dc84..4f932a36504c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -819,12 +819,15 @@ public class KeyguardIndicationController { } } - private void showTryFingerprintMsg(String a11yString) { + private void showTryFingerprintMsg(int msgId, String a11yString) { if (mKeyguardUpdateMonitor.isUdfpsAvailable()) { // if udfps available, there will always be a tappable affordance to unlock // For example, the lock icon if (mKeyguardBypassController.getUserHasDeviceEntryIntent()) { showTransientIndication(R.string.keyguard_unlock_press); + } else if (msgId == FaceManager.FACE_ERROR_LOCKOUT_PERMANENT) { + // since face is locked out, simply show "try fingerprint" + showTransientIndication(R.string.keyguard_try_fingerprint); } else { showTransientIndication(R.string.keyguard_face_failed_use_fp); } @@ -916,7 +919,7 @@ public class KeyguardIndicationController { } else if (mKeyguardUpdateMonitor.isScreenOn()) { if (biometricSourceType == BiometricSourceType.FACE && shouldSuppressFaceMsgAndShowTryFingerprintMsg()) { - showTryFingerprintMsg(helpString); + showTryFingerprintMsg(msgId, helpString); return; } showTransientIndication(helpString, false /* isError */, showActionToUnlock); @@ -936,7 +939,7 @@ public class KeyguardIndicationController { && shouldSuppressFaceMsgAndShowTryFingerprintMsg() && !mStatusBarKeyguardViewManager.isBouncerShowing() && mKeyguardUpdateMonitor.isScreenOn()) { - showTryFingerprintMsg(errString); + showTryFingerprintMsg(msgId, errString); return; } if (msgId == FaceManager.FACE_ERROR_TIMEOUT) { @@ -945,7 +948,7 @@ public class KeyguardIndicationController { if (!mStatusBarKeyguardViewManager.isBouncerShowing() && mKeyguardUpdateMonitor.isUdfpsEnrolled() && mKeyguardUpdateMonitor.isFingerprintDetectionRunning()) { - showTryFingerprintMsg(errString); + showTryFingerprintMsg(msgId, errString); } else if (mStatusBarKeyguardViewManager.isShowingAlternateAuth()) { mStatusBarKeyguardViewManager.showBouncerMessage( mContext.getResources().getString(R.string.keyguard_unlock_press), @@ -989,8 +992,8 @@ public class KeyguardIndicationController { private boolean shouldSuppressFaceMsgAndShowTryFingerprintMsg() { // For dual biometric, don't show face auth messages return mKeyguardUpdateMonitor.isFingerprintDetectionRunning() - && mKeyguardUpdateMonitor.isUnlockingWithBiometricAllowed( - true /* isStrongBiometric */); + && mKeyguardUpdateMonitor.isUnlockingWithBiometricAllowed( + true /* isStrongBiometric */); } private boolean shouldSuppressFaceError(int msgId, KeyguardUpdateMonitor updateMonitor) { |