diff options
| author | 2022-04-11 22:17:04 +0000 | |
|---|---|---|
| committer | 2022-04-11 22:17:04 +0000 | |
| commit | 9a71badec46d0bbefc20fd4078ac3f1baadf7ee1 (patch) | |
| tree | d5dbd7902387c5fd53c449106febd965a46aff02 | |
| parent | 9be9e1b60eb77d59aa79cdabac3bcc8de7393bcd (diff) | |
| parent | 78ef0c5efb2f05f5a80475c0fe4c91144f56f683 (diff) | |
Merge "Ask user to try fingerprint after face auth fail" into tm-dev am: b121b54fb4 am: 78ef0c5efb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17607578
Change-Id: I481f130242582fff23ddc2c9ee5913c1eafa05aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 61f49e044b99..83138f0666c1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -896,21 +896,8 @@ public class KeyguardIndicationController { } } - private void showTryFingerprintMsg(int msgId, String a11yString) { - if (mKeyguardUpdateMonitor.isUdfpsSupported()) { - // if udfps available, there will always be a tappable affordance to unlock - // For example, the lock icon - if (mKeyguardBypassController.getUserHasDeviceEntryIntent()) { - showBiometricMessage(R.string.keyguard_unlock_press); - } else if (msgId == FaceManager.FACE_ERROR_LOCKOUT_PERMANENT) { - // since face is locked out, simply show "try fingerprint" - showBiometricMessage(R.string.keyguard_try_fingerprint); - } else { - showBiometricMessage(R.string.keyguard_face_failed_use_fp); - } - } else { - showBiometricMessage(R.string.keyguard_try_fingerprint); - } + private void showFaceFailedTryFingerprintMsg(int msgId, String a11yString) { + showBiometricMessage(R.string.keyguard_face_failed_use_fp); // Although we suppress face auth errors visually, we still announce them for a11y if (!TextUtils.isEmpty(a11yString)) { @@ -1002,7 +989,7 @@ public class KeyguardIndicationController { } else if (mScreenLifecycle.getScreenState() == SCREEN_ON) { if (biometricSourceType == BiometricSourceType.FACE && shouldSuppressFaceMsgAndShowTryFingerprintMsg()) { - showTryFingerprintMsg(msgId, helpString); + showFaceFailedTryFingerprintMsg(msgId, helpString); return; } showBiometricMessage(helpString); @@ -1022,7 +1009,7 @@ public class KeyguardIndicationController { && shouldSuppressFaceMsgAndShowTryFingerprintMsg() && !mStatusBarKeyguardViewManager.isBouncerShowing() && mScreenLifecycle.getScreenState() == SCREEN_ON) { - showTryFingerprintMsg(msgId, errString); + showFaceFailedTryFingerprintMsg(msgId, errString); return; } if (msgId == FaceManager.FACE_ERROR_TIMEOUT) { @@ -1031,10 +1018,10 @@ public class KeyguardIndicationController { if (!mStatusBarKeyguardViewManager.isBouncerShowing() && mKeyguardUpdateMonitor.isUdfpsEnrolled() && mKeyguardUpdateMonitor.isFingerprintDetectionRunning()) { - showTryFingerprintMsg(msgId, errString); + showFaceFailedTryFingerprintMsg(msgId, errString); } else if (mStatusBarKeyguardViewManager.isShowingAlternateAuth()) { mStatusBarKeyguardViewManager.showBouncerMessage( - mContext.getResources().getString(R.string.keyguard_unlock_press), + mContext.getResources().getString(R.string.keyguard_try_fingerprint), mInitialTextColorState ); } else { |