-
Couldn't load subscription status.
- Fork 9.7k
Bump plugin Android compileSdkVersions to 31 #4502
Conversation
…utter_plugin_android_lifecycle
|
test-exempt: already tested per @stuartmorgan's comment above |
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.
LGTM with nits. Sorry there ended up being a lot of review churn in the minor details here.
...ick_actions/android/src/main/java/io/flutter/plugins/quickactions/MethodCallHandlerImpl.java
Outdated
Show resolved
Hide resolved
| @Override | ||
| public void run() { | ||
| if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1) { | ||
| shortcutManager.setDynamicShortcuts(shortcuts); |
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.
Right now you are calling result after you've dispatched the message to the background thread. You should call the result after the background task has executed (calling result from the background thread should be thread-safe now, no need to dispatch back to the main thread).
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.
calling
resultfrom the background thread should be thread-safe now
Does "now" include stable? Plugins support at least back to last stable (often more, but currently for this plugin it's 2.5)
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.
No, it doesn't I corrected myself over chat. We can't call the result directly until background platform channels is on stable.
...ick_actions/android/src/main/java/io/flutter/plugins/quickactions/MethodCallHandlerImpl.java
Show resolved
Hide resolved
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.
LGTM
| result.error( | ||
| "quick_action_setshortcutitems_failure", | ||
| "Exception thrown when setting dynamic shortcuts", | ||
| null); |
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.
This is on the wrong thread; any interaction with result needs to be (on current stable) on the main thread.
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.
One last nit, otherwise LGTM
Bumps compileSdkVersion of the following plugin example apps to 31:
android_alarm_manager,android_intent,battery,connectivity,device_info,espresso,flutter_plugin_android_lifecycle,google_maps_flutter,google_sign_in,image_picker,in_app_purchase,local_auth,package_info,path_provider,quick_actions,sensors,share,share_preferences,url_launcher,video_player,webview_flutter,wifi_info_flutter.Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].CHANGELOG.mdto add a description of the change.///).