Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Version used: 1.0.0-alpha04
Devices/Android versions reproduced on: emulator API 28
Create a new BiometricPrompt and call authenticate, a new BiometricFragment is created and added to the FragmentManager. Dismiss this BiometricPrompt.
Create a new BiometricPrompt and call authenticate, a new BiometricFragment is created but before being displayed findFragmentByTag(BIOMETRIC_FRAGMENT_TAG) is called on the FragmentManager. Because the previous BiometricFragment was only detached and not removed this returns true and instead of the new BiometricFragment being added it is instead attached. This results in the previous BiometricFragment leaking (it is still added to the FragmentManager but a new BiometricFragment has been created) and the new BiometricFragment is not displayed (attach is called without the Fragment being added therefore it is not displayed).
A fix could be to make the check to findFragmentByTag(BIOMETRIC_FRAGMENT_TAG) before creating a new BiometricFragment, and just acquire the reference to the previously created BiometricFragment instead of creating a new instance.