From 5b762c3915fed149a1f9f059f25246f5123e4bf1 Mon Sep 17 00:00:00 2001 From: Beverly Date: Fri, 10 Jun 2022 13:56:15 +0000 Subject: [PATCH] Suppress msgs from FACE_ERROR_UNABLE_TO_PROCESS Don't surface error messages on the lock screen for FACE_ERROR_UNABLE_TO_PROCESS. After 500ms from receiving this error, keyguard attempts to face auth again anyway (see KeyguardUpdateMonitor#HAL_ERROR_RETRY_ERROR_TIMEOUT). Test: atest KeyguardIndicationControllerTest Test: enroll face, press power button to LS, use camera app, then navigate back to LS, don't see the UNABLE_TO_PROCESS error. Bug: 223768181 Change-Id: I0eb017f5e5f31d8fabf36876ea0949050a9f5f58 --- .../systemui/statusbar/KeyguardIndicationController.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index ee8c232c5b7ff..86f9fa155179c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -1023,7 +1023,14 @@ public class KeyguardIndicationController { } if (biometricSourceType == BiometricSourceType.FACE - && msgId == FaceManager.FACE_ERROR_TIMEOUT) { + && msgId == FaceManager.FACE_ERROR_UNABLE_TO_PROCESS) { + // suppress all face UNABLE_TO_PROCESS errors + if (DEBUG) { + Log.d(TAG, "skip showing FACE_ERROR_UNABLE_TO_PROCESS errString=" + + errString); + } + } else if (biometricSourceType == BiometricSourceType.FACE + && msgId == FaceManager.FACE_ERROR_TIMEOUT) { if (mKeyguardUpdateMonitor.getCachedIsUnlockWithFingerprintPossible( KeyguardUpdateMonitor.getCurrentUser())) { // no message if fingerprint is also enrolled