Fixed
Status Update
Comments
py...@gmail.com <py...@gmail.com> #2
This happens to me when using pattern+fingerprint on api 29 using 1.0.1
rb...@unwire.com <rb...@unwire.com> #3
happens to me on Android P using 1.0.1
ca...@gmail.com <ca...@gmail.com> #4
Is there any workaround for this? Can we expect this to be fixed?
cu...@google.com <cu...@google.com>
ap...@google.com <ap...@google.com> #5
I am facing the same problem too! Is there any solution to this problem?
cu...@google.com <cu...@google.com>
di...@gmail.com <di...@gmail.com> #6
Still seeing this issue on Android 10 Pixel 4.
ja...@sharesies.co.nz <ja...@sharesies.co.nz> #7
Our team is facing this issue as well. What are the alternatives available right now apart from cloning the library and changing the behavior?
te...@gmail.com <te...@gmail.com> #8
Biometric prompt is also not dismissed if user goes to different apps on API levels below 29. The same behavior is not true for API 29 and above. Is there any workaround for this?
Description
Biometric library version:
1.1.0-alpha01
This bug was reported in Mozilla Fenix, but it's actually a leak in BiometricViewModel.
Mozilla Fenix bug report:https://github.com/mozilla-mobile/fenix/issues/13477
To reproduce, follow the official Android X sample code and add the sample code to a fragment. Display the login prompt, get the fragment destroyed, the fragment is now leaking
As soon as the fragment is destroyed, the leak triggers as the fragment cannot be garbage collected because the AuthenticationCallback implementation is retained.
Looking at the Android X sources , the callback is set in
BiometricPrompt
BiometricPrompt.init()
which is called from theBiometricPrompt
constructor and never unset.So, as it stands, there is no way to clear the callback, and
BiometricViewModel
is always created with an activity lifecycle, so the callback always has the lifecycle of the activity. This means that currently the library will leak any fragment it's used from.