diff --git a/README.md b/README.md index cc99b32..c1eb481 100644 --- a/README.md +++ b/README.md @@ -210,6 +210,7 @@ Fingerprint.loadBiometricSecret({ - **BIOMETRIC_LOCKED_OUT** = `-111`; - **BIOMETRIC_LOCKED_OUT_PERMANENT** = `-112`; - **BIOMETRIC_SECRET_NOT_FOUND** = `-113`; +- **BIOMETRIC_USER_CANCELED** = `-114`; *** Thanks to the authors of the original fingerprint plugins diff --git a/src/android/BiometricActivity.java b/src/android/BiometricActivity.java index ec74faf..29afd37 100644 --- a/src/android/BiometricActivity.java +++ b/src/android/BiometricActivity.java @@ -165,6 +165,8 @@ private void onError(int errorCode, @NonNull CharSequence errString) { switch (errorCode) { case BiometricPrompt.ERROR_USER_CANCELED: + finishWithError(PluginError.BIOMETRIC_USER_CANCELED); + return; case BiometricPrompt.ERROR_CANCELED: finishWithError(PluginError.BIOMETRIC_DISMISSED); return; diff --git a/src/android/PluginError.java b/src/android/PluginError.java index 4064daa..966760d 100644 --- a/src/android/PluginError.java +++ b/src/android/PluginError.java @@ -13,6 +13,7 @@ public enum PluginError { BIOMETRIC_LOCKED_OUT(-111), BIOMETRIC_LOCKED_OUT_PERMANENT(-112), BIOMETRIC_NO_SECRET_FOUND(-113), + BIOMETRIC_USER_CANCELED(-114), BIOMETRIC_ARGS_PARSING_FAILED(-115); private int value;