fython / BiometricPromptCompat

A Thrid-party BiometricPrompt compat library.
Apache License 2.0
263 stars 23 forks source link

Fixes the issue with dialog not dismissed by cancellation signal #11

Closed Anaxagor1987 closed 6 years ago

Anaxagor1987 commented 6 years ago

The cause of the problem is the fact that BiometricPromptApi23Impl for dialog dismiss relies on OnCancelListener listener that is set on cancellationSignal object in "authenticate" and "getAuthenticateDialogForFragment" methods. The same object is passed to the fingerprintManager where the listener gets reset by FinagerpringManager. That's why we have an issue when the dialog is not dismissed after we call cancellationSignal.cancel() from outside of the Prompt.