Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +7 −3 Original line number Diff line number Diff line Loading @@ -955,12 +955,16 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab setFingerprintRunningState(BIOMETRIC_STATE_STOPPED); } if (msgId == FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE || msgId == FingerprintManager.BIOMETRIC_ERROR_POWER_PRESSED) { mLogger.logRetryAfterFpError(msgId, errString); if (msgId == FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE) { mLogger.logRetryAfterFpErrorWithDelay(msgId, errString, HAL_ERROR_RETRY_TIMEOUT); mHandler.postDelayed(mRetryFingerprintAuthentication, HAL_ERROR_RETRY_TIMEOUT); } if (msgId == FingerprintManager.BIOMETRIC_ERROR_POWER_PRESSED) { mLogger.logRetryAfterFpErrorWithDelay(msgId, errString, 0); updateFingerprintListeningState(BIOMETRIC_ACTION_START); } boolean lockedOutStateChanged = false; if (msgId == FingerprintManager.FINGERPRINT_ERROR_LOCKOUT_PERMANENT) { lockedOutStateChanged = !mFingerprintLockedOutPermanent; Loading packages/SystemUI/src/com/android/keyguard/logging/KeyguardUpdateMonitorLogger.kt +3 −2 Original line number Diff line number Diff line Loading @@ -225,12 +225,13 @@ class KeyguardUpdateMonitorLogger @Inject constructor( { "Retrying face after HW unavailable, attempt $int1" }) } fun logRetryAfterFpError(msgId: Int, errString: String?) { fun logRetryAfterFpErrorWithDelay(msgId: Int, errString: String?, delay: Int) { logBuffer.log(TAG, DEBUG, { int1 = msgId int2 = delay str1 = "$errString" }, { "Fingerprint retrying auth due to($int1) -> $str1" "Fingerprint retrying auth after $int2 ms due to($int1) -> $str1" }) } Loading packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java +9 −2 Original line number Diff line number Diff line Loading @@ -837,6 +837,15 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { verify(mFaceManager).authenticate(any(), any(), any(), any(), anyInt(), anyBoolean()); } @Test public void testFingerprintPowerPressed_restartsFingerprintListeningStateImmediately() { mKeyguardUpdateMonitor.mFingerprintAuthenticationCallback .onAuthenticationError(FingerprintManager.BIOMETRIC_ERROR_POWER_PRESSED, ""); verify(mFingerprintManager).authenticate(any(), any(), any(), any(), anyInt(), anyInt(), anyInt()); } @Test public void testOnFaceAuthenticated_skipsFaceWhenAuthenticated() { // test whether face will be skipped if authenticated, so the value of isStrongBiometric Loading Loading @@ -977,8 +986,6 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { verify(mFaceManager).authenticate(any(), any(), any(), any(), anyInt(), anyBoolean()); verify(mFingerprintManager).authenticate(any(), any(), any(), any(), anyInt(), anyInt(), anyInt()); // resetFaceManager(); // resetFingerprintManager(); when(mFingerprintManager.getLockoutModeForUser(eq(FINGERPRINT_SENSOR_ID), eq(newUser))) .thenReturn(fingerprintLockoutMode); Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +7 −3 Original line number Diff line number Diff line Loading @@ -955,12 +955,16 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab setFingerprintRunningState(BIOMETRIC_STATE_STOPPED); } if (msgId == FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE || msgId == FingerprintManager.BIOMETRIC_ERROR_POWER_PRESSED) { mLogger.logRetryAfterFpError(msgId, errString); if (msgId == FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE) { mLogger.logRetryAfterFpErrorWithDelay(msgId, errString, HAL_ERROR_RETRY_TIMEOUT); mHandler.postDelayed(mRetryFingerprintAuthentication, HAL_ERROR_RETRY_TIMEOUT); } if (msgId == FingerprintManager.BIOMETRIC_ERROR_POWER_PRESSED) { mLogger.logRetryAfterFpErrorWithDelay(msgId, errString, 0); updateFingerprintListeningState(BIOMETRIC_ACTION_START); } boolean lockedOutStateChanged = false; if (msgId == FingerprintManager.FINGERPRINT_ERROR_LOCKOUT_PERMANENT) { lockedOutStateChanged = !mFingerprintLockedOutPermanent; Loading
packages/SystemUI/src/com/android/keyguard/logging/KeyguardUpdateMonitorLogger.kt +3 −2 Original line number Diff line number Diff line Loading @@ -225,12 +225,13 @@ class KeyguardUpdateMonitorLogger @Inject constructor( { "Retrying face after HW unavailable, attempt $int1" }) } fun logRetryAfterFpError(msgId: Int, errString: String?) { fun logRetryAfterFpErrorWithDelay(msgId: Int, errString: String?, delay: Int) { logBuffer.log(TAG, DEBUG, { int1 = msgId int2 = delay str1 = "$errString" }, { "Fingerprint retrying auth due to($int1) -> $str1" "Fingerprint retrying auth after $int2 ms due to($int1) -> $str1" }) } Loading
packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java +9 −2 Original line number Diff line number Diff line Loading @@ -837,6 +837,15 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { verify(mFaceManager).authenticate(any(), any(), any(), any(), anyInt(), anyBoolean()); } @Test public void testFingerprintPowerPressed_restartsFingerprintListeningStateImmediately() { mKeyguardUpdateMonitor.mFingerprintAuthenticationCallback .onAuthenticationError(FingerprintManager.BIOMETRIC_ERROR_POWER_PRESSED, ""); verify(mFingerprintManager).authenticate(any(), any(), any(), any(), anyInt(), anyInt(), anyInt()); } @Test public void testOnFaceAuthenticated_skipsFaceWhenAuthenticated() { // test whether face will be skipped if authenticated, so the value of isStrongBiometric Loading Loading @@ -977,8 +986,6 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { verify(mFaceManager).authenticate(any(), any(), any(), any(), anyInt(), anyBoolean()); verify(mFingerprintManager).authenticate(any(), any(), any(), any(), anyInt(), anyInt(), anyInt()); // resetFaceManager(); // resetFingerprintManager(); when(mFingerprintManager.getLockoutModeForUser(eq(FINGERPRINT_SENSOR_ID), eq(newUser))) .thenReturn(fingerprintLockoutMode); Loading