summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric(Feng Chou) Tsai <ericfctsai@google.com>2023-03-03 02:16:31 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-03-03 02:35:10 +0000
commit5ca1b35335cbab720f75d3c533c3e0127fe0ada3 (patch)
treed37894a7635dddc039e5eb4dc13a1f0477b74150
parent72ffe83c896e4a5fb83b3272bc79598a75c7abf3 (diff)
downloadbase-5ca1b35335cbab720f75d3c533c3e0127fe0ada3.tar.gz
Revert "RESTRICT AUTOMERGE Don't run faceDetect when fp is locked out"
This reverts commit 1a10f037a4e2d3b1ea1a869e4f9d6b1ecbda29d5. Reason for revert: prevent build break on TD3A.230203.036 Bug:269200614 Change-Id: I212a4f28daf1d429d2fbb0751128c5d8523d28b4 (cherry picked from commit b7ae45336d02bb4994a5250b483d6b1a6cbd0e87) Merged-In: I212a4f28daf1d429d2fbb0751128c5d8523d28b4
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java3
-rw-r--r--packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java34
2 files changed, 1 insertions, 36 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index 63a75c711ae2..935c7c2d85a1 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -2795,8 +2795,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
final boolean supportsDetect = !mFaceSensorProperties.isEmpty()
&& mFaceSensorProperties.get(0).supportsFaceDetection
&& canBypass && !mPrimaryBouncerIsOrWillBeShowing
- && !isUserInLockdown(user)
- && !isFingerprintLockedOut();
+ && !isUserInLockdown(user);
final boolean faceAuthAllowedOrDetectionIsNeeded = faceAuthAllowed || supportsDetect;
// If the face or fp has recently been authenticated do not attempt to authenticate again.
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
index 3e24f8561f85..f5083a756d52 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
@@ -17,7 +17,6 @@
package com.android.keyguard;
import static android.app.StatusBarManager.SESSION_KEYGUARD;
-import static android.hardware.biometrics.BiometricConstants.BIOMETRIC_LOCKOUT_TIMED;
import static android.hardware.biometrics.BiometricFingerprintConstants.FINGERPRINT_ERROR_LOCKOUT;
import static android.hardware.biometrics.BiometricFingerprintConstants.FINGERPRINT_ERROR_LOCKOUT_PERMANENT;
import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_POWER_BUTTON;
@@ -776,39 +775,6 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
}
@Test
- public void noFaceRun_whenFpLockout() {
- // GIVEN bypass is enabled, face detection is supported and strong auth is required
- lockscreenBypassIsAllowed();
- supportsFaceDetection();
- strongAuthRequiredEncrypted();
- keyguardIsVisible();
- // fingerprint is NOT running, UDFPS is NOT supported
-
- // GIVEN fp is locked out
- when(mFingerprintManager.getLockoutModeForUser(eq(FINGERPRINT_SENSOR_ID), anyInt()))
- .thenReturn(BIOMETRIC_LOCKOUT_TIMED);
- mKeyguardUpdateMonitor.handleUserSwitchComplete(0);
- assertThat(mKeyguardUpdateMonitor.isFingerprintLockedOut()).isEqualTo(true);
-
- // WHEN the device wakes up
- mKeyguardUpdateMonitor.dispatchStartedWakingUp(PowerManager.WAKE_REASON_POWER_BUTTON);
- mTestableLooper.processAllMessages();
-
- // FACE detect is NOT triggered and face authenticate is NOT triggered
- verifyFaceDetectNeverCalled();
- verifyFaceAuthenticateNeverCalled();
-
- // WHEN bouncer becomes visible
- setKeyguardBouncerVisibility(true);
- clearInvocations(mFaceManager);
-
- // THEN face scanning is not run
- mKeyguardUpdateMonitor.requestFaceAuth(FaceAuthApiRequestReason.UDFPS_POINTER_DOWN);
- verifyFaceAuthenticateNeverCalled();
- verifyFaceDetectNeverCalled();
- }
-
- @Test
public void noFaceDetect_whenStrongAuthRequiredAndBypass_faceDetectionUnsupported() {
// GIVEN bypass is enabled, face detection is NOT supported and strong auth is required
lockscreenBypassIsAllowed();