Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9a21d0b authored by Eric Biggers's avatar Eric Biggers
Browse files

Detect duplicates only of certainly-wrong guesses

Make the SoftwareRateLimiter detect duplicates only of guesses that are
known for certain to be wrong guesses, due to Weaver reporting a status
of INCORRECT_KEY.  Otherwise the failure may have another cause and the
guess may be correct, so retries of the same guess should not be blocked
by the duplicate wrong guess detection.

For now this applies only to a status of INCORRECT_KEY combined with a
zero timeout.  A later CL will handle INCORRECT_KEY with nonzero
timeout.  For now that case is still treated as a generic failure.

To unit-test this change properly, add the ability to inject responses
into MockWeaverService.  Test the behavior of LockSettingsService when
it encounters different responses from Weaver.

Test: atest FrameworksServicesTests:com.android.server.locksettings
Bug: 395976735
Flag: android.security.software_ratelimiter
Change-Id: I4a3ee8456d1220d1dd97ac8859a84c13dfaca575
parent b99e9ff1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment