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

Commit 8bf1460

Browse files
authored
Revert "[Android] Add support for text processing actions (#44579)" (#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
1 parent 97bcbd5 commit 8bf1460

File tree

7 files changed

+0
-566
lines changed

7 files changed

+0
-566
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3091,7 +3091,6 @@ ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/syst
30913091
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java + ../../../flutter/LICENSE
30923092
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java + ../../../flutter/LICENSE
30933093
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java + ../../../flutter/LICENSE
3094-
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java + ../../../flutter/LICENSE
30953094
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/RestorationChannel.java + ../../../flutter/LICENSE
30963095
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java + ../../../flutter/LICENSE
30973096
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SystemChannel.java + ../../../flutter/LICENSE
@@ -3134,7 +3133,6 @@ ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/Platf
31343133
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java + ../../../flutter/LICENSE
31353134
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java + ../../../flutter/LICENSE
31363135
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java + ../../../flutter/LICENSE
3137-
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java + ../../../flutter/LICENSE
31383136
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/util/HandlerCompat.java + ../../../flutter/LICENSE
31393137
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/util/PathUtils.java + ../../../flutter/LICENSE
31403138
ORIGIN: ../../../flutter/shell/platform/android/io/flutter/util/Preconditions.java + ../../../flutter/LICENSE
@@ -5863,7 +5861,6 @@ FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/system
58635861
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java
58645862
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java
58655863
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java
5866-
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java
58675864
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/RestorationChannel.java
58685865
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SettingsChannel.java
58695866
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java
@@ -5911,7 +5908,6 @@ FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/Platfor
59115908
FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java
59125909
FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/SurfaceTexturePlatformViewRenderTarget.java
59135910
FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java
5914-
FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/text/ProcessTextPlugin.java
59155911
FILE: ../../../flutter/shell/platform/android/io/flutter/util/HandlerCompat.java
59165912
FILE: ../../../flutter/shell/platform/android/io/flutter/util/PathUtils.java
59175913
FILE: ../../../flutter/shell/platform/android/io/flutter/util/Preconditions.java

shell/platform/android/AndroidManifest.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,4 @@
2424
</intent-filter>
2525
</activity>
2626
</application>
27-
28-
<!-- Required for io.flutter.plugin.text.ProcessTextPlugin to query activities that can process text. -->
29-
<queries>
30-
<intent>
31-
<action android:name="android.intent.action.PROCESS_TEXT" />
32-
<data android:mimeType="text/plain" />
33-
</intent>
34-
</queries>
3527
</manifest>

shell/platform/android/BUILD.gn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ android_java_sources = [
265265
"io/flutter/embedding/engine/systemchannels/NavigationChannel.java",
266266
"io/flutter/embedding/engine/systemchannels/PlatformChannel.java",
267267
"io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java",
268-
"io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java",
269268
"io/flutter/embedding/engine/systemchannels/RestorationChannel.java",
270269
"io/flutter/embedding/engine/systemchannels/SettingsChannel.java",
271270
"io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java",
@@ -313,7 +312,6 @@ android_java_sources = [
313312
"io/flutter/plugin/platform/SingleViewPresentation.java",
314313
"io/flutter/plugin/platform/SurfaceTexturePlatformViewRenderTarget.java",
315314
"io/flutter/plugin/platform/VirtualDisplayController.java",
316-
"io/flutter/plugin/text/ProcessTextPlugin.java",
317315
"io/flutter/util/HandlerCompat.java",
318316
"io/flutter/util/PathUtils.java",
319317
"io/flutter/util/Preconditions.java",

shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@
3131
import io.flutter.embedding.engine.systemchannels.MouseCursorChannel;
3232
import io.flutter.embedding.engine.systemchannels.NavigationChannel;
3333
import io.flutter.embedding.engine.systemchannels.PlatformChannel;
34-
import io.flutter.embedding.engine.systemchannels.ProcessTextChannel;
3534
import io.flutter.embedding.engine.systemchannels.RestorationChannel;
3635
import io.flutter.embedding.engine.systemchannels.SettingsChannel;
3736
import io.flutter.embedding.engine.systemchannels.SpellCheckChannel;
3837
import io.flutter.embedding.engine.systemchannels.SystemChannel;
3938
import io.flutter.embedding.engine.systemchannels.TextInputChannel;
4039
import io.flutter.plugin.localization.LocalizationPlugin;
4140
import io.flutter.plugin.platform.PlatformViewsController;
42-
import io.flutter.plugin.text.ProcessTextPlugin;
4341
import io.flutter.util.ViewUtils;
4442
import java.util.HashSet;
4543
import java.util.List;
@@ -97,7 +95,6 @@ public class FlutterEngine implements ViewUtils.DisplayUpdater {
9795
@NonNull private final NavigationChannel navigationChannel;
9896
@NonNull private final RestorationChannel restorationChannel;
9997
@NonNull private final PlatformChannel platformChannel;
100-
@NonNull private final ProcessTextChannel processTextChannel;
10198
@NonNull private final SettingsChannel settingsChannel;
10299
@NonNull private final SpellCheckChannel spellCheckChannel;
103100
@NonNull private final SystemChannel systemChannel;
@@ -332,7 +329,6 @@ public FlutterEngine(
332329
mouseCursorChannel = new MouseCursorChannel(dartExecutor);
333330
navigationChannel = new NavigationChannel(dartExecutor);
334331
platformChannel = new PlatformChannel(dartExecutor);
335-
processTextChannel = new ProcessTextChannel(dartExecutor, context.getPackageManager());
336332
restorationChannel = new RestorationChannel(dartExecutor, waitForRestorationData);
337333
settingsChannel = new SettingsChannel(dartExecutor);
338334
spellCheckChannel = new SpellCheckChannel(dartExecutor);
@@ -388,9 +384,6 @@ public FlutterEngine(
388384
}
389385

390386
ViewUtils.calculateMaximumDisplayMetrics(context, this);
391-
392-
ProcessTextPlugin processTextPlugin = new ProcessTextPlugin(this.getProcessTextChannel());
393-
this.pluginRegistry.add(processTextPlugin);
394387
}
395388

396389
private void attachToJni() {
@@ -552,12 +545,6 @@ public PlatformChannel getPlatformChannel() {
552545
return platformChannel;
553546
}
554547

555-
/** System channel that sends text processing requests from Flutter to Android. */
556-
@NonNull
557-
public ProcessTextChannel getProcessTextChannel() {
558-
return processTextChannel;
559-
}
560-
561548
/**
562549
* System channel to exchange restoration data between framework and engine.
563550
*

shell/platform/android/io/flutter/embedding/engine/systemchannels/ProcessTextChannel.java

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)