fix: Auto biometric prompt #2105

This commit is contained in:
J-Jamet committed 2025-08-10 22:34:48 +02:00
1 parent 0a0abef4d4
commit f46c062c4e
4 files changed
+9 -7

No files matched your search

@@ -288,7 +288,6 @@ class DeviceUnlockFragment: Fragment() {
// Auto open the biometric prompt
if (mDeviceUnlockViewModel.allowAutoOpenBiometricPrompt
&& PreferencesUtil.isAdvancedUnlockPromptAutoOpenEnable(requireContext())) {
mDeviceUnlockViewModel.allowAutoOpenBiometricPrompt = false
openExtractPrompt(cryptoPrompt)
}
}
@@ -418,10 +417,10 @@ class DeviceUnlockFragment: Fragment() {
private fun setAuthenticationError(errorCode: Int, errString: CharSequence) {
Log.e(TAG, "Biometric authentication error. Code : $errorCode Error : $errString")
when (errorCode) {
BiometricPrompt.ERROR_NEGATIVE_BUTTON ->
mDeviceUnlockViewModel.setException(
SecurityException(getString(R.string.error_cancel_by_user))
)
BiometricPrompt.ERROR_NEGATIVE_BUTTON,
BiometricPrompt.ERROR_USER_CANCELED -> {
// Ignore negative button
}
else ->
mDeviceUnlockViewModel.setException(
SecurityException(errString.toString())