Fixed
Status Update
Comments
cu...@google.com <cu...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit f4dd0625de408b804e98937a2f0445609cdc30e7
Author: Curtis Belmonte <curtislb@google.com>
Date: Wed Sep 11 13:15:25 2019
Fix hardware error given by FingerprintHelperFragment
Previously, FingerprintHelperFragment would yield an error code of
ERROR_HW_UNAVAILABLE when no fingerprint hardware was detected. This
commit changes this behavior to instead yield ERROR_HW_NOT_PRESENT.
Test: manual
Bug: 140427586
Change-Id: Iedde10f937c57560aa7771d93527d11822695120
M biometric/src/main/java/androidx/biometric/FingerprintHelperFragment.java
https://android-review.googlesource.com/1119590
https://goto.google.com/android-sha1/f4dd0625de408b804e98937a2f0445609cdc30e7
Branch: androidx-master-dev
commit f4dd0625de408b804e98937a2f0445609cdc30e7
Author: Curtis Belmonte <curtislb@google.com>
Date: Wed Sep 11 13:15:25 2019
Fix hardware error given by FingerprintHelperFragment
Previously, FingerprintHelperFragment would yield an error code of
ERROR_HW_UNAVAILABLE when no fingerprint hardware was detected. This
commit changes this behavior to instead yield ERROR_HW_NOT_PRESENT.
Test: manual
Bug: 140427586
Change-Id: Iedde10f937c57560aa7771d93527d11822695120
M biometric/src/main/java/androidx/biometric/FingerprintHelperFragment.java
Description
Thanks for the update, but I think there's bug in the canAuthenticate() method as it does not return proper error code on APIs < 23.
It returns BiometricManager.BIOMETRIC_ERROR_HW_UNAVAILABLE which according to comment is "The hardware is unavailable. Try again later."
Shouldn't it return BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE in this case?
ERROR_HW_UNAVAILABLE generally means the device supports fingerprint, but the HAL is crashed (or things along those lines). We should return ERROR_NO_HW
/**
* The hardware is unavailable. Try again later.
*/
int ERROR_HW_UNAVAILABLE = 1;
/**
* The device does not have a biometric sensor.
*/
int ERROR_HW_NOT_PRESENT = 12;