Update biometrics check when linking.

This commit is contained in:
Michelle Tang
2025-02-11 16:51:26 -05:00
committed by Greyson Parrelli
parent b82d16abcb
commit 95e0f7d571
3 changed files with 33 additions and 14 deletions

View File

@@ -260,7 +260,11 @@ class LinkDeviceFragment : ComposeFragment() {
private inner class BiometricAuthenticationListener : BiometricPrompt.AuthenticationCallback() {
override fun onAuthenticationError(errorCode: Int, errorString: CharSequence) {
Log.w(TAG, "Authentication error: $errorCode")
onAuthenticationFailed()
if (errorCode == BiometricPrompt.ERROR_CANCELED) {
findNavController().safeNavigate(R.id.action_linkDeviceFragment_to_addLinkDeviceFragment)
} else {
onAuthenticationFailed()
}
}
override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) {