3/n: For passive modalities, add plumbing for "try again"
When "try again" is showing, authentication is canceled internally. BiometricService caches the client's info so that authentication can be restarted when "try again" is pressed. Because authentication is not running when "try again" is showing, BiometricService also needs to have a TaskStackListener so that BP can be dismissed and an error can be sent to the client when the app loses focus. IBiometricServiceReceiver has been split into two. One for BiometricPrompt to receive messages from BiometricService, and another for BiometricService to receive messages from SystemUI/<Biometric>Services. When we get locked out, don't send the last onAuthenticationFailed to the client, since "Authentication failed" will be shown briefly and be replaced by "Device locked out" which is janky Bug: 111461540 Test: Tested with requireConfirmation enabled/disabled Test: Tested onConfigurationChange corner cases, e.g. when "try again" or "confirm" buttons are showing, rotate the device. Buttons persist correctly and don't appear when unexpected Test: Tested task stack corner cases, e.g. when "try again" is showing, press home button. BP dismisses and client receives ERROR_CANCELED Test: BiometricPromptDemo receives all callbacks Change-Id: I62126708ce8db8b358c666a07aa7c39607642c9d
Loading
Please register or sign in to comment