Fixed
Status Update
Comments
cu...@google.com <cu...@google.com>
ap...@google.com <ap...@google.com> #2
Removing from wednesday's list for now since there have been no reports.
re...@infinum.com <re...@infinum.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d02b8afc951f6a9e0fc8e24e19e56a06f1f60fac
Author: Curtis Belmonte <curtislb@google.com>
Date: Wed Sep 11 14:33:54 2019
Tolerate null result in BiometricPrompt fragments
The AndroidX BiometricPrompt API for onAuthenticationSucceeded requires
a non-null AuthenticationResult, so we construct one from the platform
BiometricPrompt or FingerprintManagerCompat result in BiometricFragment
and FingerprintHelperFragment, respectively, when calling this method.
However, the platform API does not guarantee that the result it provides
will be non-null, in which case the current implementation would crash.
This commit fixes the issue by creating an AuthenticationResult with
null crypto when handling a null result in either of these places. It
also adds unit tests to verify the new behavior.
Test: ./gradlew biometric:connectedAndroidTest
Fixes: 138862251
Change-Id: I540dd3b4ebdf100553b4fac609f3d928ec69ebfb
A biometric/src/androidTest/java/androidx/biometric/BiometricFragmentTest.java
A biometric/src/androidTest/java/androidx/biometric/FingerprintHelperFragmentTest.java
M biometric/src/main/java/androidx/biometric/BiometricFragment.java
M biometric/src/main/java/androidx/biometric/FingerprintHelperFragment.java
https://android-review.googlesource.com/1122743
https://goto.google.com/android-sha1/d02b8afc951f6a9e0fc8e24e19e56a06f1f60fac
Branch: androidx-master-dev
commit d02b8afc951f6a9e0fc8e24e19e56a06f1f60fac
Author: Curtis Belmonte <curtislb@google.com>
Date: Wed Sep 11 14:33:54 2019
Tolerate null result in BiometricPrompt fragments
The AndroidX BiometricPrompt API for onAuthenticationSucceeded requires
a non-null AuthenticationResult, so we construct one from the platform
BiometricPrompt or FingerprintManagerCompat result in BiometricFragment
and FingerprintHelperFragment, respectively, when calling this method.
However, the platform API does not guarantee that the result it provides
will be non-null, in which case the current implementation would crash.
This commit fixes the issue by creating an AuthenticationResult with
null crypto when handling a null result in either of these places. It
also adds unit tests to verify the new behavior.
Test: ./gradlew biometric:connectedAndroidTest
Fixes: 138862251
Change-Id: I540dd3b4ebdf100553b4fac609f3d928ec69ebfb
A biometric/src/androidTest/java/androidx/biometric/BiometricFragmentTest.java
A biometric/src/androidTest/java/androidx/biometric/FingerprintHelperFragmentTest.java
M biometric/src/main/java/androidx/biometric/BiometricFragment.java
M biometric/src/main/java/androidx/biometric/FingerprintHelperFragment.java
Description
If this is a bug in the library, we would appreciate if you could attach:
BUILD INFO
STEPS TO REPRODUCE [Be as specific as possible please]
EXPECTED RESULTS
I expect available hardware for these devices because they do have a Fingerprint sensor and they do classify as BIOMETRIC_STRONG because if run Biometric authentication without any set authenticators the internal lib will set the authenticator to BIOMETRIC_STRONG since I have a crypto object initialised and everything works as expected. The method that is responsible for setting the authenticator to strong is
getConsolidatedAuthenticators(@NonNull BiometricPrompt.PromptInfo info, @Nullable BiometricPrompt.CryptoObject crypto)
inside the first else block:OBSERVED RESULTS
I get a BIOMETRIC_ERROR_HW_UNAVAILABLE inside the BiometricManager class due to the fingerprintManager being null:
the result does not make sense to me because I do have a device which have the appropriate strong classified HW based on the behaviour in the EXPECTED RESULTS section. The fingerprint implementation with the CryptoObject worked fine on 1.0.1 version of the library.
NUMBER OF TIMES YOU WERE ABLE TO REPRODUCE (e.g. 3/10)
10/10