From d969a1057a6d9fea5cb07b012101aefda4c59504 Mon Sep 17 00:00:00 2001 From: Beverly Date: Mon, 13 Jun 2022 16:44:43 +0000 Subject: [PATCH] Never play face errors for co-ex If face and fingerprint are enrolled, don't play face failure haptics on errors or face failures. In general, don't play face haptics on error (to mimic functionality of the haptic played in system server). Test: manual Fixes: 231756704 Change-Id: I8a3350f148cf27549e937c3da98ddfc8853690b8 --- .../statusbar/phone/BiometricUnlockController.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java index 808ba544eb5e3..39620ac231173 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java @@ -676,7 +676,10 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp } } - if (biometricSourceType == BiometricSourceType.FACE) { + // Suppress all face auth errors if fingerprint can be used to authenticate + if (biometricSourceType == BiometricSourceType.FACE + && !mUpdateMonitor.getCachedIsUnlockWithFingerprintPossible( + KeyguardUpdateMonitor.getCurrentUser())) { vibrateError(); } @@ -703,10 +706,6 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp UI_EVENT_LOGGER.log(BiometricUiEvent.BIOMETRIC_BOUNCER_SHOWN, getSessionId()); } - if (biometricSourceType == BiometricSourceType.FACE) { - vibrateError(); - } - cleanup(); }