Skip to content

Commit dcdf72a

Browse files
authored
[flutter_tools] - Add queries section to Android manifest file (#137207)
## Description This PR adds a new section to the Android manifest file. This section is required for flutter/engine#44579 (because it uses `PackageManager.queryIntentActivities` API ), see: 1. https://developer.android.com/training/package-visibility?hl=en 2. https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT 3. https://developer.android.com/reference/android/content/pm/PackageManager?hl=en#queryIntentActivities(android.content.Intent,%20android.content.pm.PackageManager.ResolveInfoFlags) ## Related Issue Android manifest update for flutter/flutter#107603 ## Tests This PR updates the integration tests and examples Android manifest files, this will help catch error or warning related to this change.
1 parent 76f7d2d commit dcdf72a

26 files changed

Lines changed: 300 additions & 1 deletion

File tree

dev/integration_tests/abstract_method_smoke_test/android/app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,15 @@ found in the LICENSE file. -->
3131
android:name="flutterEmbedding"
3232
android:value="2" />
3333
</application>
34+
<!-- Required to query activities that can process text, see:
35+
https://developer.android.com/training/package-visibility?hl=en and
36+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
37+
38+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
39+
<queries>
40+
<intent>
41+
<action android:name="android.intent.action.PROCESS_TEXT"/>
42+
<data android:mimeType="text/plain"/>
43+
</intent>
44+
</queries>
3445
</manifest>

dev/integration_tests/android_embedding_v2_smoke_test/android/app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,15 @@ found in the LICENSE file. -->
3131
android:name="flutterEmbedding"
3232
android:value="2" />
3333
</application>
34+
<!-- Required to query activities that can process text, see:
35+
https://developer.android.com/training/package-visibility?hl=en and
36+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
37+
38+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
39+
<queries>
40+
<intent>
41+
<action android:name="android.intent.action.PROCESS_TEXT"/>
42+
<data android:mimeType="text/plain"/>
43+
</intent>
44+
</queries>
3445
</manifest>

dev/integration_tests/android_semantics_testing/android/app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,15 @@ found in the LICENSE file. -->
3535
android:name="flutterEmbedding"
3636
android:value="2" />
3737
</application>
38+
<!-- Required to query activities that can process text, see:
39+
https://developer.android.com/training/package-visibility?hl=en and
40+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
41+
42+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
43+
<queries>
44+
<intent>
45+
<action android:name="android.intent.action.PROCESS_TEXT"/>
46+
<data android:mimeType="text/plain"/>
47+
</intent>
48+
</queries>
3849
</manifest>

dev/integration_tests/android_views/android/app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,15 @@ found in the LICENSE file. -->
3232
android:name="flutterEmbedding"
3333
android:value="2" />
3434
</application>
35+
<!-- Required to query activities that can process text, see:
36+
https://developer.android.com/training/package-visibility?hl=en and
37+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
38+
39+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
40+
<queries>
41+
<intent>
42+
<action android:name="android.intent.action.PROCESS_TEXT"/>
43+
<data android:mimeType="text/plain"/>
44+
</intent>
45+
</queries>
3546
</manifest>

dev/integration_tests/channels/android/app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,15 @@ found in the LICENSE file. -->
3434
android:name="flutterEmbedding"
3535
android:value="2" />
3636
</application>
37+
<!-- Required to query activities that can process text, see:
38+
https://developer.android.com/training/package-visibility?hl=en and
39+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
40+
41+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
42+
<queries>
43+
<intent>
44+
<action android:name="android.intent.action.PROCESS_TEXT"/>
45+
<data android:mimeType="text/plain"/>
46+
</intent>
47+
</queries>
3748
</manifest>

dev/integration_tests/deferred_components_test/android/app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,15 @@ found in the LICENSE file. -->
4242
android:name="io.flutter.embedding.engine.deferredcomponents.DeferredComponentManager.loadingUnitMapping"
4343
android:value="2:component1" />
4444
</application>
45+
<!-- Required to query activities that can process text, see:
46+
https://developer.android.com/training/package-visibility?hl=en and
47+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
48+
49+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
50+
<queries>
51+
<intent>
52+
<action android:name="android.intent.action.PROCESS_TEXT"/>
53+
<data android:mimeType="text/plain"/>
54+
</intent>
55+
</queries>
4556
</manifest>

dev/integration_tests/external_ui/android/app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,15 @@ found in the LICENSE file. -->
2828
android:name="flutterEmbedding"
2929
android:value="2" />
3030
</application>
31+
<!-- Required to query activities that can process text, see:
32+
https://developer.android.com/training/package-visibility?hl=en and
33+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
34+
35+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
36+
<queries>
37+
<intent>
38+
<action android:name="android.intent.action.PROCESS_TEXT"/>
39+
<data android:mimeType="text/plain"/>
40+
</intent>
41+
</queries>
3142
</manifest>

dev/integration_tests/flavors/android/app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,15 @@ found in the LICENSE file. -->
2727
android:name="flutterEmbedding"
2828
android:value="2" />
2929
</application>
30+
<!-- Required to query activities that can process text, see:
31+
https://developer.android.com/training/package-visibility?hl=en and
32+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
33+
34+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
35+
<queries>
36+
<intent>
37+
<action android:name="android.intent.action.PROCESS_TEXT"/>
38+
<data android:mimeType="text/plain"/>
39+
</intent>
40+
</queries>
3041
</manifest>

dev/integration_tests/flutter_gallery/android/app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,15 @@ found in the LICENSE file. -->
2828
android:name="flutterEmbedding"
2929
android:value="2" />
3030
</application>
31+
<!-- Required to query activities that can process text, see:
32+
https://developer.android.com/training/package-visibility?hl=en and
33+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
34+
35+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
36+
<queries>
37+
<intent>
38+
<action android:name="android.intent.action.PROCESS_TEXT"/>
39+
<data android:mimeType="text/plain"/>
40+
</intent>
41+
</queries>
3142
</manifest>

dev/integration_tests/gradle_deprecated_settings/android/app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,15 @@ found in the LICENSE file. -->
2828
android:name="flutterEmbedding"
2929
android:value="2" />
3030
</application>
31+
<!-- Required to query activities that can process text, see:
32+
https://developer.android.com/training/package-visibility?hl=en and
33+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
34+
35+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
36+
<queries>
37+
<intent>
38+
<action android:name="android.intent.action.PROCESS_TEXT"/>
39+
<data android:mimeType="text/plain"/>
40+
</intent>
41+
</queries>
3142
</manifest>

0 commit comments

Comments
 (0)