From 2b88dc67bbbdd1a8a4dd92fa212f98aa7596938c Mon Sep 17 00:00:00 2001 From: Beverly Date: Thu, 22 Jul 2021 09:06:22 -0400 Subject: [PATCH] Show "use fingerprint to open" msg for coex If face auth fails and fingerprint is running, show the "use fingerprint to open" msg. Fixes: 194358779 Test: manual Change-Id: I249fcf550ac1ca5881d55566a4366937263690bf --- .../statusbar/KeyguardIndicationController.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 4d15a0afdd0a2..120121ce7f0ec 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -885,7 +885,10 @@ public class KeyguardIndicationController { mStatusBarKeyguardViewManager.showBouncerMessage(helpString, mInitialTextColorState); } else if (mKeyguardUpdateMonitor.isScreenOn()) { - if (biometricSourceType == BiometricSourceType.FACE && shouldSuppressFaceMsg()) { + if (biometricSourceType == BiometricSourceType.FACE + && shouldSuppressFaceMsgAndShowTryFingerprintMsg()) { + // suggest trying fingerprint + showTransientIndication(R.string.keyguard_try_fingerprint); return; } showTransientIndication(helpString, false /* isError */, showSwipeToUnlock); @@ -903,9 +906,11 @@ public class KeyguardIndicationController { return; } if (biometricSourceType == BiometricSourceType.FACE - && shouldSuppressFaceMsg() + && shouldSuppressFaceMsgAndShowTryFingerprintMsg() && !mStatusBarKeyguardViewManager.isBouncerShowing() && mKeyguardUpdateMonitor.isScreenOn()) { + // suggest trying fingerprint + showTransientIndication(R.string.keyguard_try_fingerprint); return; } if (msgId == FaceManager.FACE_ERROR_TIMEOUT) { @@ -956,7 +961,7 @@ public class KeyguardIndicationController { || msgId == FingerprintManager.FINGERPRINT_ERROR_USER_CANCELED); } - private boolean shouldSuppressFaceMsg() { + private boolean shouldSuppressFaceMsgAndShowTryFingerprintMsg() { // For dual biometric, don't show face auth messages return mKeyguardUpdateMonitor.isFingerprintDetectionRunning() && mKeyguardUpdateMonitor.isUnlockingWithBiometricAllowed(