From 21f4c140f27dfe49c70a0553710d65f35c99aa96 Mon Sep 17 00:00:00 2001 From: Yoann CHAMBRUN Date: Fri, 9 Dec 2022 14:43:48 +0100 Subject: [PATCH 1/7] Send a new event if the user closes the prompt --- package.json | 2 +- src/android/BiometricActivity.java | 2 ++ src/android/PluginError.java | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4f50b5c9..b8898255 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "cordova-plugin-fingerprint-aio", + "name": "@ownesthq/cordova-plugin-fingerprint-aio", "version": "5.0.1", "description": "Cordova plugin to use fingerprint authentication on Android and iOS", "cordova": { diff --git a/src/android/BiometricActivity.java b/src/android/BiometricActivity.java index ec74fafa..29afd374 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 4064daab..4cef45bf 100644 --- a/src/android/PluginError.java +++ b/src/android/PluginError.java @@ -6,6 +6,7 @@ public enum PluginError { BIOMETRIC_AUTHENTICATION_FAILED(-102, "Authentication failed"), BIOMETRIC_HARDWARE_NOT_SUPPORTED(-104), BIOMETRIC_NOT_ENROLLED(-106), + BIOMETRIC_USER_CANCELED(-107), BIOMETRIC_DISMISSED(-108), BIOMETRIC_PIN_OR_PATTERN_DISMISSED(-109), BIOMETRIC_SCREEN_GUARD_UNSECURED(-110, From ed5064bfae7bccaad2ec9487e24065432b3adb0d Mon Sep 17 00:00:00 2001 From: Yoann CHAMBRUN Date: Fri, 9 Dec 2022 15:04:28 +0100 Subject: [PATCH 2/7] Revert package name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8898255..4f50b5c9 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@ownesthq/cordova-plugin-fingerprint-aio", + "name": "cordova-plugin-fingerprint-aio", "version": "5.0.1", "description": "Cordova plugin to use fingerprint authentication on Android and iOS", "cordova": { From b38ba35957eeb0800f0a4959883c2f5a999c6a42 Mon Sep 17 00:00:00 2001 From: Yoann CHAMBRUN Date: Fri, 9 Dec 2022 15:12:55 +0100 Subject: [PATCH 3/7] Change code of BIOMETRIC_USER_CANCELED from -107 to -114 --- README.md | 1 + src/android/PluginError.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cc99b320..c1eb4818 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/PluginError.java b/src/android/PluginError.java index 4cef45bf..966760d9 100644 --- a/src/android/PluginError.java +++ b/src/android/PluginError.java @@ -6,7 +6,6 @@ public enum PluginError { BIOMETRIC_AUTHENTICATION_FAILED(-102, "Authentication failed"), BIOMETRIC_HARDWARE_NOT_SUPPORTED(-104), BIOMETRIC_NOT_ENROLLED(-106), - BIOMETRIC_USER_CANCELED(-107), BIOMETRIC_DISMISSED(-108), BIOMETRIC_PIN_OR_PATTERN_DISMISSED(-109), BIOMETRIC_SCREEN_GUARD_UNSECURED(-110, @@ -14,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; From f590e6d55be4baca462ffaa61803b3d50b46bc4a Mon Sep 17 00:00:00 2001 From: Yoann CHAMBRUN Date: Fri, 9 Dec 2022 15:16:37 +0100 Subject: [PATCH 4/7] 5.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4f50b5c9..a8bdce4b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-fingerprint-aio", - "version": "5.0.1", + "version": "5.1.0", "description": "Cordova plugin to use fingerprint authentication on Android and iOS", "cordova": { "id": "cordova-plugin-fingerprint-aio", From a1b13d8e7e3a1268c5480c427a2f5bacafb12684 Mon Sep 17 00:00:00 2001 From: Yoann CHAMBRUN Date: Fri, 9 Dec 2022 15:24:36 +0100 Subject: [PATCH 5/7] Revert version --- .vscode/settings.json | 6 +++++- package.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 742797d3..f481b2c6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,8 @@ { - "editor.quickSuggestions": false, + "editor.quickSuggestions": { + "comments": "off", + "strings": "off", + "other": "off" + }, "sde.buildOnSave": true } \ No newline at end of file diff --git a/package.json b/package.json index a8bdce4b..4f50b5c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-fingerprint-aio", - "version": "5.1.0", + "version": "5.0.1", "description": "Cordova plugin to use fingerprint authentication on Android and iOS", "cordova": { "id": "cordova-plugin-fingerprint-aio", From 7e75e8f777834f18421954148817dbb9f73f0611 Mon Sep 17 00:00:00 2001 From: Yoann CHAMBRUN Date: Fri, 9 Dec 2022 15:27:00 +0100 Subject: [PATCH 6/7] Remove settings --- .vscode/settings.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index f481b2c6..4c0b33fa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,3 @@ { - "editor.quickSuggestions": { - "comments": "off", - "strings": "off", - "other": "off" - }, - "sde.buildOnSave": true + "editor.quickSuggestions": false, } \ No newline at end of file From cce1b8a26b609fafecbad0993f00c0c69949c571 Mon Sep 17 00:00:00 2001 From: Yoann CHAMBRUN Date: Fri, 9 Dec 2022 15:28:40 +0100 Subject: [PATCH 7/7] active sde.buildOnSave --- .vscode/settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 4c0b33fa..742797d3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,4 @@ { "editor.quickSuggestions": false, + "sde.buildOnSave": true } \ No newline at end of file