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
Loading
Please register or sign in to comment