Merge "Authentication state stays on enrollment mismatch" into udc-qpr-dev

This commit is contained in:
Jeff Pu
2023-07-21 15:09:23 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 1 deletions

View File

@@ -258,7 +258,7 @@ bool FakeFingerprintEngine::onAuthenticateFingerDown(ISessionCallback* cb,
cb->onAuthenticationFailed(); cb->onAuthenticationFailed();
mLockoutTracker.addFailedAttempt(); mLockoutTracker.addFailedAttempt();
checkSensorLockout(cb); checkSensorLockout(cb);
return true; return false;
} }
} }

View File

@@ -269,6 +269,7 @@ TEST_F(FakeFingerprintEngineTest, AuthenticateNotEnrolled) {
mEngine.authenticateImpl(mCallback.get(), 0, mCancel.get_future()); mEngine.authenticateImpl(mCallback.get(), 0, mCancel.get_future());
mEngine.fingerDownAction(); mEngine.fingerDownAction();
ASSERT_TRUE(mCallback->mAuthenticateFailed); ASSERT_TRUE(mCallback->mAuthenticateFailed);
ASSERT_EQ(mEngine.getWorkMode(), FakeFingerprintEngine::WorkMode::kAuthenticate);
} }
TEST_F(FakeFingerprintEngineTest, AuthenticateLockout) { TEST_F(FakeFingerprintEngineTest, AuthenticateLockout) {