This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Use io.flutter.Build.API_LEVELS rather than android.os.Build.VERSION_CODES
#51171
Merged
Merged
Changes from 5 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
297270a
Guard against API 22
dnfield feaeae9
Ban android.Build.VERSION_CODES
dnfield d516bb0
merge
dnfield b245c6a
unintended change
dnfield 5d824e2
missing symbol
dnfield c419ebf
Merge remote-tracking branch 'upstream/main' into version_Codes
dnfield da04a27
Use class
dnfield 0bd7854
missing imports
dnfield 262afee
Doc update, checker update, TargetApi/RequiresApi update
dnfield da7f0c2
more imports
dnfield ced3f92
Merge branch 'main' into version_Codes
dnfield eb297be
reid review
dnfield 71f3490
missing files
dnfield 9586efb
one last missing import
dnfield File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -70,7 +70,7 @@ public void processTextAction( | |
| return; | ||
| } | ||
|
|
||
| if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { | ||
| if (Build.VERSION.SDK_INT < 23) { | ||
| result.error("error", "Android version not supported", null); | ||
| return; | ||
| } | ||
|
|
@@ -105,14 +105,14 @@ public void processTextAction( | |
| private void cacheResolveInfos() { | ||
| resolveInfosById = new HashMap<String, ResolveInfo>(); | ||
|
|
||
| if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { | ||
| if (Build.VERSION.SDK_INT < 23) { | ||
| return; | ||
| } | ||
|
|
||
| Intent intent = new Intent().setAction(Intent.ACTION_PROCESS_TEXT).setType("text/plain"); | ||
|
|
||
| List<ResolveInfo> infos; | ||
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { | ||
| if (Build.VERSION.SDK_INT >= 33) { | ||
| infos = packageManager.queryIntentActivities(intent, PackageManager.ResolveInfoFlags.of(0)); | ||
| } else { | ||
| infos = packageManager.queryIntentActivities(intent, 0); | ||
|
|
@@ -134,8 +134,8 @@ private void cacheResolveInfos() { | |
| * <p>When an activity does not return a value. the request is completed successfully and returns | ||
| * null. | ||
| */ | ||
| @TargetApi(Build.VERSION_CODES.M) | ||
| @RequiresApi(Build.VERSION_CODES.M) | ||
| @TargetApi(23) | ||
|
||
| @RequiresApi(23) | ||
| public boolean onActivityResult(int requestCode, int resultCode, @Nullable Intent intent) { | ||
| // Return early if the result is not related to a request sent by this plugin. | ||
| if (!requestsByCode.containsKey(requestCode)) { | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix here and below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I lost track of what these were - I'll update them all.