Closed TheNephilim88 closed 5 years ago
Hi,
Detecting a new fingerprint is not triggered randomly. One thing I'm guessing is that you may have created a new key after new fingerprints were added.
This sample creates a new key in onCreate, so if you launch the sample app after you add a new fingerprint, KeyPermanentlyInvalidatedException is not thrown because at the time the key is created, a set of fingerprints include the new created one.
If you want to test that KeyPermanentlyInvalidatedException, please try to add a new fingerprint while keeping the app open.
Also this is a case for me - I get (API 26 both emulator and Nexus 5x) IllegalBlockSizeException
instead of KeyPermanentlyInvalidatedException
after adding new imprint.
I believe this is the reason of this issue: https://issuetracker.google.com/issues/65578763
I am closing this issue/PR, as it has been migrated to the new repo linked above in the comments. Thank you!
The initCipher()-method checks if lockscreen has been disabled or new fingerprints have been enrolled. For this it checks if a KeyPermanentlyInvalidatedException will be thrown or not. If it wil lbe thrown, any of above reasons apply.
But this does not seem to trigger all the time. It only triggers randomly on my device (Nexus 5X) after adding new fingerprints. Most of the time I get normal fingerprint-authentication dialog and it works as nothing has been changed. Only very few times I get "A new fingerprint was added to this device"-message to reauthenticate.
Can anyone tell me why this is not triggering all the time when new fingerprints have been enrolled? Is this a bug or a feature? :D
Is it possible to check for fingerprint-changes in another way?