forked from flutter/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[local_auth] Convert Android to Pigeon (flutter#3748)
Updates the platform communication to use Pigeon. This includes some changes to the API boundary: - Collected authentication options into an options object; this avoids having a lot of positional boolean arguments (since Pigeon doesn't currently support named arguments). - Collected strings into a strings object, since having them as individual parameters would have been extremely messy. - Changes the `authenticate` return from a bool+exceptions to an enum that encompasses all of the explicitly known failure modes. To avoid a breaking change for clients, the Dart code creates `PlatformException`s that match the old ones, but this will make it much easier to someday make a (cross-platform) breaking change to replace them with better errors per the best practices we have documented on the wiki. Using an enum rather than throwing errors avoids the need to do string matching when we want to eventually translate them into something other than `PlatformException`. This removes all Java warnings from the baseline file; the remaining issues in code I wasn't already changing were easy enough to fix opportunistically. There are still XML-based warnings, but fixing those was well out of scope so I left them. Part of flutter/flutter#117912
- Loading branch information
1 parent
4a24af2
commit 9d7db6f
Showing
16 changed files
with
2,051 additions
and
861 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
packages/local_auth/local_auth_android/android/src/main/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="io.flutter.plugins.localauth"> | ||
<uses-sdk android:targetSdkVersion="29"/> | ||
<uses-permission android:name="android.permission.USE_BIOMETRIC" /> | ||
</manifest> |
Oops, something went wrong.