diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index 0d4b543a63925..833292e18819f 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -1460,6 +1460,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab ErrorAuthenticationStatus error = (ErrorAuthenticationStatus) status; handleFaceError(error.getMsgId(), error.getMsg()); } else if (status instanceof FailedAuthenticationStatus) { + if (isFaceLockedOut()) { + // TODO b/270090188: remove this hack when biometrics fixes this issue. + // FailedAuthenticationStatus is emitted after ErrorAuthenticationStatus + // for lockout error is received + mLogger.d("onAuthenticationFailed called after" + + " face has been locked out"); + return; + } handleFaceAuthFailed(); } else if (status instanceof HelpAuthenticationStatus) { HelpAuthenticationStatus helpMsg = (HelpAuthenticationStatus) status; @@ -1968,6 +1976,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab @Override public void onAuthenticationFailed() { + if (isFaceLockedOut()) { + // TODO b/270090188: remove this hack when biometrics fixes this issue. + // onAuthenticationFailed is called after onAuthenticationError + // for lockout error is received + mLogger.d("onAuthenticationFailed called after face has been locked out"); + return; + } handleFaceAuthFailed(); }