diff options
| author | 2023-07-27 03:02:01 -0700 | |
|---|---|---|
| committer | 2023-08-03 16:19:06 +0000 | |
| commit | e4726ac63ac2f184191dd231d5f8dd7f8b3f08d7 (patch) | |
| tree | 1743ab3efdf53e110fc8df2b36e178efcc0acd09 | |
| parent | c1ea19c0d9d8e3928bcb42ca6597e64a8cde78d3 (diff) | |
Show unlock with fingerprint message for co-ex face locked out scenario
Bug: 236891644
Test: verified manually
Change-Id: I59e48540214b6c2a1ff3b43acf5b5213e163e18e
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/bouncer/data/factory/BouncerMessageFactory.kt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/data/factory/BouncerMessageFactory.kt b/packages/SystemUI/src/com/android/systemui/bouncer/data/factory/BouncerMessageFactory.kt index 3206c0043d5c..3b0b8125c02b 100644 --- a/packages/SystemUI/src/com/android/systemui/bouncer/data/factory/BouncerMessageFactory.kt +++ b/packages/SystemUI/src/com/android/systemui/bouncer/data/factory/BouncerMessageFactory.kt @@ -131,7 +131,9 @@ constructor( PROMPT_REASON_AFTER_LOCKOUT -> biometricLockout(securityMode) PROMPT_REASON_PREPARE_FOR_UPDATE -> authRequiredForUnattendedUpdate(securityMode) PROMPT_REASON_FINGERPRINT_LOCKED_OUT -> fingerprintUnlockUnavailable(securityMode) - PROMPT_REASON_FACE_LOCKED_OUT -> faceUnlockUnavailable(securityMode) + PROMPT_REASON_FACE_LOCKED_OUT -> + if (fpAllowedInBouncer) faceLockedOutButFingerprintAvailable(securityMode) + else faceLockedOut(securityMode) PROMPT_REASON_INCORRECT_PRIMARY_AUTH_INPUT -> if (fpAllowedInBouncer) incorrectSecurityInputWithFingerprint(securityMode) else incorrectSecurityInput(securityMode) @@ -311,7 +313,7 @@ private fun nonStrongAuthTimeoutWithFingerprintAllowed(securityMode: SecurityMod } } -private fun faceUnlockUnavailable(securityMode: SecurityMode): Pair<Int, Int> { +private fun faceLockedOut(securityMode: SecurityMode): Pair<Int, Int> { return when (securityMode) { SecurityMode.Pattern -> Pair(keyguard_enter_pattern, kg_face_locked_out) SecurityMode.Password -> Pair(keyguard_enter_password, kg_face_locked_out) @@ -320,6 +322,15 @@ private fun faceUnlockUnavailable(securityMode: SecurityMode): Pair<Int, Int> { } } +private fun faceLockedOutButFingerprintAvailable(securityMode: SecurityMode): Pair<Int, Int> { + return when (securityMode) { + SecurityMode.Pattern -> Pair(kg_unlock_with_pattern_or_fp, kg_face_locked_out) + SecurityMode.Password -> Pair(kg_unlock_with_password_or_fp, kg_face_locked_out) + SecurityMode.PIN -> Pair(kg_unlock_with_pin_or_fp, kg_face_locked_out) + else -> Pair(0, 0) + } +} + private fun fingerprintUnlockUnavailable(securityMode: SecurityMode): Pair<Int, Int> { return when (securityMode) { SecurityMode.Pattern -> Pair(keyguard_enter_pattern, kg_fp_locked_out) |