diff options
| -rw-r--r-- | packages/SystemUI/res/values/strings.xml | 2 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt | 23 |
2 files changed, 16 insertions, 9 deletions
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 0772954af977..f47c6407719d 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -443,6 +443,8 @@ <string name="biometric_dialog_tap_confirm_with_face_alt_2">Face recognized. Press to continue.</string> <!-- Message shown when a biometric has authenticated with a user's face and is waiting for the user to confirm authentication [CHAR LIMIT=60]--> <string name="biometric_dialog_tap_confirm_with_face_alt_3">Face recognized. Press the unlock icon to continue.</string> + <!-- Message shown when a biometric has authenticated with a user's face and is waiting for the user to confirm authentication with SFPS [CHAR LIMIT=60]--> + <string name="biometric_dialog_tap_confirm_with_face_sfps">Unlocked by face. Tap to continue.</string> <!-- Talkback string when a biometric is authenticated [CHAR LIMIT=NONE] --> <string name="biometric_dialog_authenticated">Authenticated</string> <!-- Talkback string when a canceling authentication [CHAR LIMIT=NONE] --> diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt index 408e2c2d65a1..c868d01de743 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt @@ -580,17 +580,22 @@ class Spaghetti( } } - private suspend fun getHelpForSuccessfulAuthentication( + private fun getHelpForSuccessfulAuthentication( authenticatedModality: BiometricModality, - ): Int? = - when { - // for coex, show a message when face succeeds after fingerprint has also started - modalities.hasFaceAndFingerprint && - (viewModel.fingerprintStartMode.first() != FingerprintStartMode.Pending) && - (authenticatedModality == BiometricModality.Face) -> - R.string.biometric_dialog_tap_confirm_with_face_alt_1 - else -> null + ): Int? { + // for coex, show a message when face succeeds after fingerprint has also started + if (authenticatedModality != BiometricModality.Face) { + return null + } + + if (modalities.hasUdfps) { + return R.string.biometric_dialog_tap_confirm_with_face_alt_1 } + if (modalities.hasSfps) { + return R.string.biometric_dialog_tap_confirm_with_face_sfps + } + return null + } fun onAuthenticationFailed( @BiometricAuthenticator.Modality modality: Int, |