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

[share] Do not tear down channel onDetachedFromActivity. #3942

Merged
merged 5 commits into from May 21, 2021

Conversation

zhenqiu1101
Copy link
Contributor

@zhenqiu1101 zhenqiu1101 commented May 20, 2021

We should not tear down the method channel onDetachedFromActivity. That will cause MissingPluginException for the following method calls. internal: b/183065251. Open source issue: flutter/flutter#12264

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 Flutter Style Guide and the C++, Objective-C, Java style guides. (Note that unlike the flutter/flutter repo, the flutter/plugins repo does use dart format. See plugin_tool 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.
  • 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 feature I am adding, or Hixie said the PR is test exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@zhenqiu1101
Copy link
Contributor Author

Open source issue: flutter/flutter#12264

@xster
Copy link
Member

xster commented May 20, 2021

This is sooooo good! Awesome find! This totally makes sense. The current implementation doesn't work since it's not symmetrical between engine attach/detach and activity attach/detach.

@zhenqiu1101
Copy link
Contributor Author

@cyanglaz

Hi Chris, could you advice on the test failures?

@zhenqiu1101
Copy link
Contributor Author

Chris is on leave. @stuartmorgan could you please advice on the test failures? It looks unrelated the PR. iOS share test and url_launcher plugin. Wanna make sure that the PR is safe to merge. Thanks!

Try merging to fix the tests.
@stuartmorgan
Copy link
Contributor

We can land this since it's affecting an internal customer, but we're in the process of turning this plugin down in favor of https://pub.dev/packages/share_plus; see the notice in CONTRIBUTING.md. You should submit this fix there as well since at some point there should be a transition to that version, and you'll want to have this fix there as well.

@stuartmorgan stuartmorgan added the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label May 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes p: share platform-android waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
3 participants