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

Revert "[Android] Add support for text processing actions (#44579)" #46788

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

gmackall
Copy link
Member

@gmackall gmackall commented Oct 11, 2023

This reverts commit d93fe23.

This change is causing integration tests to fail on attempts to roll the latest master version of flutter into the packages repo.

See a sample failure here: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8767521956894285553/+/u/Run_package_tests/native_integration_tests/stdout

The root cause seems to be that we are getting request codes in onActivityResult that we never added to the requestsByCode map, so the call to remove returns null (and we then call success getting a NPE).

More info:

  1. There is a discussion in discord here
  2. And the failure can be reproduced by running dart run script/tool/bin/flutter_plugin_tools.dart native-test --android --packages file_selector from the root of the packages repo (with a flutter checkout that contains these changes).

cc @bleroux

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

@bleroux
Copy link
Contributor

bleroux commented Oct 11, 2023

@gmackall Thanks for the detailed report. 👍
The cause is clearly the one you described :

The root cause seems to be that we are getting request codes in onActivityResult that we never added to the requestsByCode map, so the call to remove returns null (and we then call success getting a NPE).

I will reland this PR with a check on the request code.

@gmackall gmackall marked this pull request as ready for review October 11, 2023 19:32
@gmackall gmackall added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 11, 2023
@auto-submit auto-submit bot merged commit 8bf1460 into flutter:main Oct 11, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 11, 2023
…136414)

flutter/engine@2b1b4b9...8bf1460

2023-10-11 [email protected] Revert "[Android] Add support for text processing actions (#44579)" (flutter/engine#46788)
2023-10-11 [email protected] [web] Adds Noto Music fallback font (flutter/engine#46720)
2023-10-11 [email protected] Fix some image_external_texture entries in the license golden file (flutter/engine#46790)
2023-10-11 [email protected] Rename HardwareBufferExternalTexture* to ImageExternalTexture* (flutter/engine#46786)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
auto-submit bot pushed a commit that referenced this pull request Oct 16, 2023
## Description

This is a reland of #44579 which was reverted in #46788.

This reland adds a check into `onActivityResult` in order to return early if the result is related to an unknown request code (aka the result is related to a request sent by another plugin).
It also adds one test that simulates receiving such an unknown request code.

## Related Issue

Android engine side for flutter/flutter#107603

## Tests

Adds 4 tests.
harryterkelsen pushed a commit that referenced this pull request Oct 23, 2023
…46788)

This reverts commit d93fe23.

This change is causing integration tests to fail on attempts to roll the latest master version of flutter into the packages repo.

See a sample failure here: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8767521956894285553/+/u/Run_package_tests/native_integration_tests/stdout

The root cause seems to be that we are getting request codes in `onActivityResult` that we never added to the `requestsByCode` map, so the call to remove returns null (and we then call success getting a NPE).

More info: 
1. There is a [discussion in discord here](https://discord.com/channels/608014603317936148/1161718667566919761/1161721935927980052)
2. And the failure can be reproduced by running `dart run script/tool/bin/flutter_plugin_tools.dart native-test --android --packages file_selector` from the root of the packages repo (with a flutter checkout that contains these changes).

cc @bleroux 

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
harryterkelsen pushed a commit that referenced this pull request Oct 23, 2023
## Description

This is a reland of #44579 which was reverted in #46788.

This reland adds a check into `onActivityResult` in order to return early if the result is related to an unknown request code (aka the result is related to a request sent by another plugin).
It also adds one test that simulates receiving such an unknown request code.

## Related Issue

Android engine side for flutter/flutter#107603

## Tests

Adds 4 tests.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.

3 participants