Skip to content

[local_auth] Update Pigeon in iOS and Android #7724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/local_auth/local_auth_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.45

* Updates to the latest version of Pigeon.

## 1.0.44

* Removes dependency on org.jetbrains.kotlin:kotlin-bom.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugins.localauth.AuthenticationHelper.AuthCompletionHandler;
import io.flutter.plugins.localauth.Messages.AuthClassification;
import io.flutter.plugins.localauth.Messages.AuthClassificationWrapper;
import io.flutter.plugins.localauth.Messages.AuthOptions;
import io.flutter.plugins.localauth.Messages.AuthResult;
import io.flutter.plugins.localauth.Messages.AuthStrings;
Expand Down Expand Up @@ -82,23 +81,19 @@ public LocalAuthPlugin() {}
return hasBiometricHardware();
}

public @NonNull List<AuthClassificationWrapper> getEnrolledBiometrics() {
ArrayList<AuthClassificationWrapper> biometrics = new ArrayList<>();
public @NonNull List<AuthClassification> getEnrolledBiometrics() {
ArrayList<AuthClassification> biometrics = new ArrayList<>();
if (biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK)
== BiometricManager.BIOMETRIC_SUCCESS) {
biometrics.add(wrappedBiometric(AuthClassification.WEAK));
biometrics.add(AuthClassification.WEAK);
}
if (biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_STRONG)
== BiometricManager.BIOMETRIC_SUCCESS) {
biometrics.add(wrappedBiometric(AuthClassification.STRONG));
biometrics.add(AuthClassification.STRONG);
}
return biometrics;
}

private @NonNull AuthClassificationWrapper wrappedBiometric(AuthClassification value) {
return new AuthClassificationWrapper.Builder().setValue(value).build();
}

public @NonNull Boolean stopAuthentication() {
try {
if (authHelper != null && authInProgress.get()) {
Expand Down Expand Up @@ -208,12 +203,12 @@ public boolean canAuthenticateWithDeviceCredential() {

@Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
LocalAuthApi.setup(binding.getBinaryMessenger(), this);
LocalAuthApi.setUp(binding.getBinaryMessenger(), this);
}

@Override
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
LocalAuthApi.setup(binding.getBinaryMessenger(), null);
LocalAuthApi.setUp(binding.getBinaryMessenger(), null);
}

private void setServicesFromActivity(Activity activity) {
Expand Down
Loading