From 35847e4734d4bd22f8b08394897ffa5997972ba2 Mon Sep 17 00:00:00 2001 From: Jia Hao Date: Sat, 30 Jan 2021 08:33:00 +0800 Subject: [PATCH] [local_auth] Fix incorrect switch fallthrough (#3473) --- packages/local_auth/CHANGELOG.md | 14 +++++++++----- .../plugins/localauth/AuthenticationHelper.java | 1 + packages/local_auth/pubspec.yaml | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/local_auth/CHANGELOG.md b/packages/local_auth/CHANGELOG.md index 8bb043f52d8fd..152ffb603e107 100644 --- a/packages/local_auth/CHANGELOG.md +++ b/packages/local_auth/CHANGELOG.md @@ -2,10 +2,14 @@ * Allow pin, passcode, and pattern authentication with `authenticate` method * **Breaking change**. Parameter names refactored to use the generic `biometric` prefix in place of `fingerprint` in the `AndroidAuthMessages` class - * `fingerprintHint` is now `biometricHint` - * `fingerprintNotRecognized`is now `biometricNotRecognized` - * `fingerprintSuccess`is now `biometricSuccess` - * `fingerprintRequiredTitle` is now `biometricRequiredTitle` + * `fingerprintHint` is now `biometricHint` + * `fingerprintNotRecognized`is now `biometricNotRecognized` + * `fingerprintSuccess`is now `biometricSuccess` + * `fingerprintRequiredTitle` is now `biometricRequiredTitle` + +## 1.0.0-nullsafety.4 + +* Fix incorrect error handling switch case fallthrough. ## 1.0.0-nullsafety.3 @@ -203,4 +207,4 @@ ## 0.0.1 -* Initial release of local authentication plugin. \ No newline at end of file +* Initial release of local authentication plugin. diff --git a/packages/local_auth/android/src/main/java/io/flutter/plugins/localauth/AuthenticationHelper.java b/packages/local_auth/android/src/main/java/io/flutter/plugins/localauth/AuthenticationHelper.java index 096c7efd6d3d2..3a7e2d76ca080 100644 --- a/packages/local_auth/android/src/main/java/io/flutter/plugins/localauth/AuthenticationHelper.java +++ b/packages/local_auth/android/src/main/java/io/flutter/plugins/localauth/AuthenticationHelper.java @@ -138,6 +138,7 @@ public void onAuthenticationError(int errorCode, CharSequence errString) { return; } completionHandler.onError("NotAvailable", "Security credentials not available."); + break; case BiometricPrompt.ERROR_NO_SPACE: case BiometricPrompt.ERROR_NO_BIOMETRICS: if (promptInfo.isDeviceCredentialAllowed()) return; diff --git a/packages/local_auth/pubspec.yaml b/packages/local_auth/pubspec.yaml index 0f5a58835c3cf..79870cc57da28 100644 --- a/packages/local_auth/pubspec.yaml +++ b/packages/local_auth/pubspec.yaml @@ -1,8 +1,8 @@ name: local_auth -description: Flutter plugin for Android and iOS devices to allow local +description: Flutter plugin for Android and iOS devices to allow local authentication via fingerprint, touch ID, face ID, passcode, pin, or pattern. homepage: https://github.com/flutter/plugins/tree/master/packages/local_auth -version: 1.0.0-nullsafety.3 +version: 1.0.0-nullsafety.4 flutter: plugin: