From 5dcdf3569c69e147b54f641f619d774b93d8c2e0 Mon Sep 17 00:00:00 2001 From: Robert Snoeberger Date: Mon, 24 Jun 2019 11:28:28 -0400 Subject: [PATCH] Don't listen for face when in `lockout` or `lockdown` Fixes: 132668248 Test: manual -- checked lock icon doesn't indicate face auth is running after entering the wrong pin 5 times. Change-Id: I2a255d53aa38eb46bf136f2b8fcbb5364cb3a81b --- .../src/com/android/keyguard/KeyguardUpdateMonitor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index cdb72162407b1..d3fe2c36c6b0c 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -1658,13 +1658,17 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private boolean shouldListenForFace() { final boolean awakeKeyguard = mKeyguardIsVisible && mDeviceInteractive && !mGoingToSleep; final int user = getCurrentUser(); + final int strongAuth = mStrongAuthTracker.getStrongAuthForUser(user); + final boolean isLockOutOrLockDown = + strongAuth == StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT + || strongAuth == StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN; // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. return (mBouncer || mAuthInterruptActive || awakeKeyguard || shouldListenForFaceAssistant()) && !mSwitchingUser && !getUserCanSkipBouncer(user) && !isFaceDisabled(user) && !mKeyguardGoingAway && mFaceSettingEnabledForUser && !mLockIconPressed && mUserManager.isUserUnlocked(user) && mIsPrimaryUser - && !mSecureCameraLaunched; + && !mSecureCameraLaunched && !isLockOutOrLockDown; } /**