Change BiometricManager#hasEnrolledBiometrics to canAuthenticate
BiometricPrompt#authenticate and BiometricManager#canAuthenticate now use the same logic to determine if the prompt can successfully be shown. Before Android P, apps used FingerprintManager isHwAvail && hasEnrolled before asking users to enable biometrics for their app. With BiometricPrompt, which abstracts away individual biometric modalities, developers need a way to determine if they should ask users to enable biometrics for their app. Having separate checks is a nightmare due to the untestable combinations of multi-biometric devices. This API change makes it much more scalable since the logic will be done in the platform. Fixes: 116823693 Test: manual test, returns status correctly Change-Id: Ie0ecd139c9a39100b6dbc9bd85462400cb465f08
Loading
Please register or sign in to comment