summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Austin Delgado <austindelgado@google.com> 2024-06-26 18:23:28 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-06-26 18:23:28 +0000
commit1b0fb448c3d91e3e71684b478dd5f60ee68c1217 (patch)
tree61f2b2c8e4a8b91b6734fd3231b336e1cd04c6cb
parentb0d259e2ad9f6850495e95ebe125ee06f7b17017 (diff)
parentc705e9faaad45bc9afc4b15634b368376cf1fd52 (diff)
Merge "Add a new string for SFPS coex" into main
-rw-r--r--packages/SystemUI/res/values/strings.xml2
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt23
2 files changed, 16 insertions, 9 deletions
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 31a999bf845e..3eacaa148b29 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -447,6 +447,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,