Merge "Ask user to try fingerprint after face auth fail" into tm-dev am: b121b54fb4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17607578 Change-Id: I187d1b8268d3314e06ed025ddc4ea1106cafb289 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -896,21 +896,8 @@ public class KeyguardIndicationController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showTryFingerprintMsg(int msgId, String a11yString) {
|
private void showFaceFailedTryFingerprintMsg(int msgId, String a11yString) {
|
||||||
if (mKeyguardUpdateMonitor.isUdfpsSupported()) {
|
showBiometricMessage(R.string.keyguard_face_failed_use_fp);
|
||||||
// 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Although we suppress face auth errors visually, we still announce them for a11y
|
// Although we suppress face auth errors visually, we still announce them for a11y
|
||||||
if (!TextUtils.isEmpty(a11yString)) {
|
if (!TextUtils.isEmpty(a11yString)) {
|
||||||
@@ -1002,7 +989,7 @@ public class KeyguardIndicationController {
|
|||||||
} else if (mScreenLifecycle.getScreenState() == SCREEN_ON) {
|
} else if (mScreenLifecycle.getScreenState() == SCREEN_ON) {
|
||||||
if (biometricSourceType == BiometricSourceType.FACE
|
if (biometricSourceType == BiometricSourceType.FACE
|
||||||
&& shouldSuppressFaceMsgAndShowTryFingerprintMsg()) {
|
&& shouldSuppressFaceMsgAndShowTryFingerprintMsg()) {
|
||||||
showTryFingerprintMsg(msgId, helpString);
|
showFaceFailedTryFingerprintMsg(msgId, helpString);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showBiometricMessage(helpString);
|
showBiometricMessage(helpString);
|
||||||
@@ -1022,7 +1009,7 @@ public class KeyguardIndicationController {
|
|||||||
&& shouldSuppressFaceMsgAndShowTryFingerprintMsg()
|
&& shouldSuppressFaceMsgAndShowTryFingerprintMsg()
|
||||||
&& !mStatusBarKeyguardViewManager.isBouncerShowing()
|
&& !mStatusBarKeyguardViewManager.isBouncerShowing()
|
||||||
&& mScreenLifecycle.getScreenState() == SCREEN_ON) {
|
&& mScreenLifecycle.getScreenState() == SCREEN_ON) {
|
||||||
showTryFingerprintMsg(msgId, errString);
|
showFaceFailedTryFingerprintMsg(msgId, errString);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (msgId == FaceManager.FACE_ERROR_TIMEOUT) {
|
if (msgId == FaceManager.FACE_ERROR_TIMEOUT) {
|
||||||
@@ -1031,10 +1018,10 @@ public class KeyguardIndicationController {
|
|||||||
if (!mStatusBarKeyguardViewManager.isBouncerShowing()
|
if (!mStatusBarKeyguardViewManager.isBouncerShowing()
|
||||||
&& mKeyguardUpdateMonitor.isUdfpsEnrolled()
|
&& mKeyguardUpdateMonitor.isUdfpsEnrolled()
|
||||||
&& mKeyguardUpdateMonitor.isFingerprintDetectionRunning()) {
|
&& mKeyguardUpdateMonitor.isFingerprintDetectionRunning()) {
|
||||||
showTryFingerprintMsg(msgId, errString);
|
showFaceFailedTryFingerprintMsg(msgId, errString);
|
||||||
} else if (mStatusBarKeyguardViewManager.isShowingAlternateAuth()) {
|
} else if (mStatusBarKeyguardViewManager.isShowingAlternateAuth()) {
|
||||||
mStatusBarKeyguardViewManager.showBouncerMessage(
|
mStatusBarKeyguardViewManager.showBouncerMessage(
|
||||||
mContext.getResources().getString(R.string.keyguard_unlock_press),
|
mContext.getResources().getString(R.string.keyguard_try_fingerprint),
|
||||||
mInitialTextColorState
|
mInitialTextColorState
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user