diff --git a/src/Android/Services/DeviceActionService.cs b/src/Android/Services/DeviceActionService.cs index 02cee112a..78390e741 100644 --- a/src/Android/Services/DeviceActionService.cs +++ b/src/Android/Services/DeviceActionService.cs @@ -446,7 +446,8 @@ namespace Bit.Droid.Services new BiometricAuthenticationCallback { Success = authResult => result.TrySetResult(true), - Failed = () => result.TrySetResult(false), + Error = () => result.TrySetResult(false), + Failed = () => { }, Help = (helpCode, helpString) => { } }); return result.Task; @@ -866,6 +867,7 @@ namespace Bit.Droid.Services private class BiometricAuthenticationCallback : BiometricPrompt.AuthenticationCallback { public Action Success { get; set; } + public Action Error { get; set; } public Action Failed { get; set; } public Action Help { get; set; } @@ -875,6 +877,12 @@ namespace Bit.Droid.Services Success?.Invoke(authResult); } + public override void OnAuthenticationError([GeneratedEnum] BiometricErrorCode errorCode, Java.Lang.ICharSequence errString) + { + base.OnAuthenticationError(errorCode, errString); + Error?.Invoke(); + } + public override void OnAuthenticationFailed() { base.OnAuthenticationFailed();