Fixed
Status Update
Comments
cu...@google.com <cu...@google.com>
cu...@google.com <cu...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
ap...@google.com <ap...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
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;