Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

camsim99
Copy link
Contributor

@camsim99 camsim99 commented Nov 11, 2021

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

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter]. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the [CLA].
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@Hixie
Copy link
Contributor

Hixie commented Nov 17, 2021

test-exempt: already tested per @stuartmorgan's comment above

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a 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.

@Override
public void run() {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1) {
shortcutManager.setDynamicShortcuts(shortcuts);
Copy link
Member

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).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calling result from 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)

Copy link
Member

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.

@camsim99 camsim99 requested a review from blasten November 18, 2021 00:28
Copy link

@blasten blasten left a 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);
Copy link
Contributor

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.

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a 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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants