Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix autofill for android #40771

Merged
merged 2 commits into from
Apr 6, 2023
Merged

Conversation

bparrishMines
Copy link
Contributor

@bparrishMines bparrishMines commented Mar 29, 2023

Fixes flutter/flutter#92165.

Temporary fix for plugin: flutter/packages#3588

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.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

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

@@ -92,6 +92,15 @@ public void attachToFlutterEngine_alertsPlatformViews() {
verify(platformViewsController, times(1)).attachToView(flutterView);
}

@Test
public void flutterView_importantForAutofillDoesNotExcludeDescendants() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to test not that the value is set but instead that a child view can have autofill?
This feels a bit like a change detector test.

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this test need to indicate that it should only run for android o and above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it possible to test not that the value is set but instead that a child view can have autofill?
This feels a bit like a change detector test.

I wasn't able to find a way to test if child views receive autofills automatically. I tried to manually call autofill with no luck. And the documentation only provides an example to test it manually: https://developer.android.com/guide/topics/text/autofill-optimize.

Does this test need to indicate that it should only run for android o and above?

I believe the method is only callable on versions O and above. Without the version check, we would get lint warnings that the method would cause crashes on lower versions.

Copy link
Contributor

@LongCatIsLooong LongCatIsLooong left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

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

@bparrishMines approved independent of a different method of testing.

@bparrishMines bparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 6, 2023
@auto-submit auto-submit bot merged commit 9620c64 into flutter:main Apr 6, 2023
@bparrishMines bparrishMines deleted the autofill_fix branch April 6, 2023 14:54
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2023
zhongwuzw pushed a commit to zhongwuzw/engine that referenced this pull request Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[webview_flutter] Autofill doesn't work
3 participants