diff options
| author | 2019-03-19 00:53:31 +0000 | |
|---|---|---|
| committer | 2019-03-19 00:53:31 +0000 | |
| commit | 650c3faaa1db35a9422e7aa646d9e120ffc1437f (patch) | |
| tree | 238611678931c4151e973806dcbc6805d2cceeb5 | |
| parent | 01ba71b8c0956d45898695541d22fa75b89787af (diff) | |
| parent | 2927d2c6d96363d2af73d54c7ea826acd6cefc19 (diff) | |
Merge "Update BiometricPrompt documentation"
| -rw-r--r-- | core/java/android/hardware/biometrics/BiometricPrompt.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/hardware/biometrics/BiometricPrompt.java b/core/java/android/hardware/biometrics/BiometricPrompt.java index e751b2c77dbb..08035972a0db 100644 --- a/core/java/android/hardware/biometrics/BiometricPrompt.java +++ b/core/java/android/hardware/biometrics/BiometricPrompt.java @@ -523,6 +523,11 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan * cancelled notification through {@link AuthenticationCallback#onAuthenticationError(int, * CharSequence)}. * + * Note: Applications generally should not cancel and start authentication in quick succession. + * For example, to properly handle authentication across configuration changes, it's recommended + * to use BiometricPrompt in a fragment with setRetainInstance(true). By doing so, the + * application will not need to cancel/restart authentication during the configuration change. + * * @throws IllegalArgumentException If any of the arguments are null * * @param crypto Object associated with the call @@ -568,6 +573,11 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan * authentication. The interrupted client will receive a cancelled notification through {@link * AuthenticationCallback#onAuthenticationError(int, CharSequence)}. * + * Note: Applications generally should not cancel and start authentication in quick succession. + * For example, to properly handle authentication across configuration changes, it's recommended + * to use BiometricPrompt in a fragment with setRetainInstance(true). By doing so, the + * application will not need to cancel/restart authentication during the configuration change. + * * @throws IllegalArgumentException If any of the arguments are null * * @param cancel An object that can be used to cancel authentication |