Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f48a94e authored by Austin Delgado's avatar Austin Delgado Committed by Android Build Coastguard Worker
Browse files

Add a new string for SFPS coex

Sfps Coex: https://screenshot.googleplex.com/4AxpQ67X74hv3uM.png
Udfps Coex: https://screenshot.googleplex.com/6x2VpZcbwBrivEo.png

Flag: NONE String change
Bug: 348631566
Test: atest com.android.systemui.biometrics
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c705e9faaad45bc9afc4b15634b368376cf1fd52)
Merged-In: I8669c88d27d2f8e06e7cdff7b740ff1d0f0d5227
Change-Id: I8669c88d27d2f8e06e7cdff7b740ff1d0f0d5227
parent 0a7bfa70
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -441,6 +441,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] -->
+14 −9
Original line number Diff line number Diff line
@@ -580,16 +580,21 @@ class Spaghetti(
        }
    }

    private suspend fun getHelpForSuccessfulAuthentication(
    private fun getHelpForSuccessfulAuthentication(
        authenticatedModality: BiometricModality,
    ): Int? =
        when {
    ): Int? {
        // 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
        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(