Co-ex: when face fails use error string

Use string "Can't recognize face. Use fingerprint instead"
Only used if the user hasn't touch udfps yet

Test: manual, atest KeyguardIndicationControllerTest
Fixes: 195161046
Change-Id: I8206d3acbaf9e20702570c700beb6248d86a858e
This commit is contained in:
Beverly
2021-08-04 15:23:13 -04:00
parent 7de16da32d
commit 4d31f24424
2 changed files with 7 additions and 1 deletions

View File

@@ -438,6 +438,8 @@
<string name="fingerprint_dialog_use_fingerprint">Use your fingerprint to continue</string>
<!-- Message shown to ask the user to use screenlock to continue.[CHAR LIMIT=NONE] -->
<string name="fingerprint_dialog_cant_recognize_fp_use_screenlock">Can\u2019t recognize fingerprint. Use screen lock instead.</string>
<!-- Message shown to inform the user a face cannot be recognized and fingerprint should instead be used.[CHAR LIMIT=50] -->
<string name="keyguard_face_failed_use_fp">@string/fingerprint_dialog_use_fingerprint_instead</string>
<!-- Message shown when the system-provided face dialog is shown, asking for authentication [CHAR LIMIT=30] -->
<string name="face_dialog_looking_for_face">Looking for you\u2026</string>

View File

@@ -825,7 +825,11 @@ public class KeyguardIndicationController {
if (mKeyguardUpdateMonitor.isUdfpsAvailable()) {
// if udfps available, there will always be a tappable affordance to unlock
// For example, the lock icon
showTransientIndication(R.string.keyguard_unlock_press);
if (mKeyguardBypassController.getUserHasDeviceEntryIntent()) {
showTransientIndication(R.string.keyguard_unlock_press);
} else {
showTransientIndication(R.string.keyguard_face_failed_use_fp);
}
} else {
showTransientIndication(R.string.keyguard_try_fingerprint);
}