Authentication state stays on enrollment mismatch

Bug: 291778822
Test: atest FakeFingerprintEngineTest
Change-Id: I4566303af982855aa0ebc52652464fb116a23858
This commit is contained in:
Jeff Pu 2023-07-20 13:07:04 +00:00
parent 13b2b44565
commit 8fec556d25
2 changed files with 2 additions and 1 deletions

View file

@ -258,7 +258,7 @@ bool FakeFingerprintEngine::onAuthenticateFingerDown(ISessionCallback* cb,
cb->onAuthenticationFailed();
mLockoutTracker.addFailedAttempt();
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.fingerDownAction();
ASSERT_TRUE(mCallback->mAuthenticateFailed);
ASSERT_EQ(mEngine.getWorkMode(), FakeFingerprintEngine::WorkMode::kAuthenticate);
}
TEST_F(FakeFingerprintEngineTest, AuthenticateLockout) {