Skip to content

Conversation

@wytesk133
Copy link
Contributor

Android 12 introduces a toast message that appears when an app reads the content of the clipboard. Currently, whenever there is a TextField widget, the app reads from the clipboard passively to determine whether the clipboard is empty and whether the "Paste" button should be shown. To avoid unintended access, always show the paste button (similar to #60316).

This PR is a short-term workaround for b/192897521 and #74139. For a long-term solution, both the Flutter engine and the Flutter framework need to be updated to use the appropriate API to check whether the clipboard is empty.

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, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • 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.

Android 12 introduces a toast message that appears when an app reads the content of the clipboard. Currently, whenever there is a `TextField` widget, the app reads from the clipboard passively to determine whether the clipboard is empty and whether the "Paste" button should be shown. To avoid unintended access, always show the paste button.
@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Jul 21, 2021
@google-cla google-cla bot added the cla: yes label Jul 21, 2021
@skia-gold
Copy link

Gold has detected about 3 new digest(s) on patchset 1.
View them at https://flutter-gold.skia.org/cl/github/86791

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #86791 at sha e03ed64

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Jul 21, 2021
@justinmc justinmc self-requested a review July 21, 2021 18:09
@justinmc
Copy link
Contributor

@wytesk133 I checked out this branch and tried it locally. Now the three goldens failures seem to all basically look like this:

master this PR
master test

This looks like an improvement to me. I think you should accept the changes in these three goldens images 👍 . It looks like once again the blue highlight was off by one frame, and now that we're using pumpAndSettle it's showing. The cursor seems to appear correctly in both.

@wytesk133
Copy link
Contributor Author

Golden images accepted and flutter-rob passed.

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the goldens! LGTM 👍

@angjieli
Copy link
Contributor

This PR introduced a failure in Google3. Reverting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants