[Android] Remove support for unused manifest flags#186021
Conversation
…rk-policy manifest flags This commit resolves GitHub Issue flutter#179276 by removing support for the deprecated 'io.flutter.automatically-register-plugins' and 'io.flutter.network-policy' Android manifest flags from the embedding loader and its unit test suite. 1. Cleaned up ApplicationInfoLoader.java: * Removed constants NETWORK_POLICY_METADATA_KEY and PUBLIC_AUTOMATICALLY_REGISTER_PLUGINS_METADATA_KEY from ApplicationInfoLoader.java. * Completely deleted the getNetworkPolicy method and all its sub-methods (parseDomainConfig, skipTag, parseDomain), removing over 90 lines of legacy XML parsing code. * Simplified the load() method to pass "" (empty string) for domainNetworkPolicy and true for automaticallyRegisterPlugins directly to the FlutterApplicationInfo constructor. 2. Cleaned up ApplicationInfoLoaderTest.java: * Removed legacy XML resource parser mocking logic (createMockResourceParser) and context generation hooks from ApplicationInfoLoaderTest.java. * Removed 3 complex network policy unit test cases (itGeneratesCorrectNetworkPolicy, itHandlesBogusInformationInNetworkPolicy, itHandlesNestedSubDomains), keeping the remaining manifest tests fully robust, clean, and compiling. BUG=179276
…move deprecated parameters This commit refactors the FlutterApplicationInfo class constructor by removing the deprecated domainNetworkPolicy and automaticallyRegisterPlugins parameters from the public constructor API, achieving a cleaner, simplified public API after the removal of their manifest flags. 1. Refactored FlutterApplicationInfo.java: * Removed domainNetworkPolicy and automaticallyRegisterPlugins from the FlutterApplicationInfo constructor parameter list in FlutterApplicationInfo.java. * Hardcoded/defaulted this.domainNetworkPolicy = "" and this.automaticallyRegisterPlugins = true internally inside the class fields to ensure 100% backward compatibility for all dependent engine/test callers. 2. Refactored ApplicationInfoLoader.java: * Updated the new FlutterApplicationInfo(...) instantiation call inside ApplicationInfoLoader.java to use the new, simplified 5-parameter constructor. BUG=179276
There was a problem hiding this comment.
Code Review
This pull request removes the network policy parsing logic, the automatic plugin registration flag, and support for the deprecated assets directory metadata key from the Android embedding. A critical syntax error was identified in the ApplicationInfoLoader.load method, where the removal of arguments resulted in malformed method calls and missing parentheses, which will prevent the code from compiling.
camsim99
left a comment
There was a problem hiding this comment.
This is actually my bad 😅 but upon closer read of https://docs.flutter.dev/release/breaking-changes/network-policy-ios-android, we may want to leave io.flutter.network-policy because it's a workaround for devs.
I'll update the issue #179276. If we still land this for the automatic registration flag, would you mind updating the todo? I'll leave a comment there.
camsim99
left a comment
There was a problem hiding this comment.
LGTM, thanks for clarifying that the network flag is not hooked up!
flutter/flutter@b10d0f1...15963bc 2026-06-18 [email protected] Roll Skia from 6e84902d56c3 to 1ae2466c9ea5 (4 revisions) (flutter/flutter#188172) 2026-06-18 [email protected] Roll Packages from 6ce00a8 to 4fd05e6 (3 revisions) (flutter/flutter#188171) 2026-06-18 [email protected] [Linux] Fix vertical offset in composite_layer (flutter/flutter#188145) 2026-06-18 [email protected] [Linux] Fix incorrect GL datatypes for uniform locations (flutter/flutter#188143) 2026-06-18 [email protected] Roll Dart SDK from e05c69222ea4 to 5883736e7670 (2 revisions) (flutter/flutter#188168) 2026-06-18 [email protected] Roll Skia from 046277850e8d to 6e84902d56c3 (5 revisions) (flutter/flutter#188165) 2026-06-18 [email protected] Roll Fuchsia Linux SDK from or21OEdGtairm6nl9... to 1E2qOlNnC2Ucn-1oV... (flutter/flutter#188162) 2026-06-18 [email protected] Roll Skia from 8dd207d443d3 to 046277850e8d (1 revision) (flutter/flutter#188153) 2026-06-18 [email protected] Add entitlements.txt entries for new dart sdk binaries (flutter/flutter#188133) 2026-06-18 [email protected] Roll Dart SDK from b670723c5f07 to e05c69222ea4 (1 revision) (flutter/flutter#188146) 2026-06-18 [email protected] Fix bounds checking in FlAccessibleTextField (flutter/flutter#188137) 2026-06-18 [email protected] Roll Skia from f5a2921fe23e to 8dd207d443d3 (2 revisions) (flutter/flutter#188141) 2026-06-18 [email protected] Adds tests for disabling macos impeller (flutter/flutter#188132) 2026-06-17 [email protected] Improve Flutter Web accessibility: update flt meta viewport tag to align with WCAG 2 guidelines (flutter/flutter#182047) 2026-06-17 [email protected] Roll Dart SDK from e39bde5b1bfc to b670723c5f07 (2 revisions) (flutter/flutter#188130) 2026-06-17 [email protected] Roll Skia from 066bfbac7282 to f5a2921fe23e (1 revision) (flutter/flutter#188128) 2026-06-17 [email protected] Support --trace-systrace in release builds on Android (flutter/flutter#186359) 2026-06-17 [email protected] Isolate compiled dill caches by TargetModel (flutter/flutter#187253) 2026-06-17 98614782+auto-submit[bot]@users.noreply.github.com Reverts "refactor(web): Unify Image on Skwasm and CanvasKit (#187873)" (flutter/flutter#188124) 2026-06-17 [email protected] Use a mock EGL manager in windows unittests to avoid flaky rendering calls (flutter/flutter#188078) 2026-06-17 [email protected] [Android] Remove support for unused manifest flags (flutter/flutter#186021) 2026-06-17 [email protected] Adds windows project switch for enabling impeller (flutter/flutter#188044) 2026-06-17 [email protected] Skip prefetch SwiftPM dependencies if the project hasn't been migrated to SwiftPM yet (flutter/flutter#187206) 2026-06-17 [email protected] [flutter_tools] Bump dwds to 27.1.2 (flutter/flutter#187951) 2026-06-17 [email protected] Adds external texture devicelab test for windows impeller (flutter/flutter#187886) 2026-06-17 [email protected] Roll Skia from 5d19002eb73e to 066bfbac7282 (2 revisions) (flutter/flutter#188118) 2026-06-17 [email protected] Add note about magnifier issue when using transparent HCPP pv (flutter/flutter#187753) 2026-06-17 [email protected] [linux]: fixes crash when resizing windows (flutter/flutter#187626) 2026-06-17 [email protected] [flutter_tools] Enforce that package-declared asset paths stay within the package (flutter/flutter#187661) 2026-06-17 [email protected] Remove canvaskit_cipd_instance from DEPS (flutter/flutter#188073) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
This commit resolves GitHub Issue flutter#179276 by removing support for the deprecated 'io.flutter.automatically-register-plugins' and 'io.flutter.network-policy' Android manifest flags from the embedding loader and its unit test suite. 1. Cleaned up ApplicationInfoLoader.java: * Removed constants NETWORK_POLICY_METADATA_KEY and PUBLIC_AUTOMATICALLY_REGISTER_PLUGINS_METADATA_KEY from ApplicationInfoLoader.java. * Completely deleted the getNetworkPolicy method and all its sub-methods (parseDomainConfig, skipTag, parseDomain), removing over 90 lines of legacy XML parsing code. * Simplified the load() method to pass "" (empty string) for domainNetworkPolicy and true for automaticallyRegisterPlugins directly to the FlutterApplicationInfo constructor. 2. Cleaned up ApplicationInfoLoaderTest.java: * Removed legacy XML resource parser mocking logic (createMockResourceParser) and context generation hooks from ApplicationInfoLoaderTest.java. * Removed 3 complex network policy unit test cases (itGeneratesCorrectNetworkPolicy, itHandlesBogusInformationInNetworkPolicy, itHandlesNestedSubDomains), keeping the remaining manifest tests fully robust, clean, and compiling. Fixes: 179276 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing.
This commit resolves GitHub Issue flutter#179276 by removing support for the deprecated 'io.flutter.automatically-register-plugins' and 'io.flutter.network-policy' Android manifest flags from the embedding loader and its unit test suite. 1. Cleaned up ApplicationInfoLoader.java: * Removed constants NETWORK_POLICY_METADATA_KEY and PUBLIC_AUTOMATICALLY_REGISTER_PLUGINS_METADATA_KEY from ApplicationInfoLoader.java. * Completely deleted the getNetworkPolicy method and all its sub-methods (parseDomainConfig, skipTag, parseDomain), removing over 90 lines of legacy XML parsing code. * Simplified the load() method to pass "" (empty string) for domainNetworkPolicy and true for automaticallyRegisterPlugins directly to the FlutterApplicationInfo constructor. 2. Cleaned up ApplicationInfoLoaderTest.java: * Removed legacy XML resource parser mocking logic (createMockResourceParser) and context generation hooks from ApplicationInfoLoaderTest.java. * Removed 3 complex network policy unit test cases (itGeneratesCorrectNetworkPolicy, itHandlesBogusInformationInNetworkPolicy, itHandlesNestedSubDomains), keeping the remaining manifest tests fully robust, clean, and compiling. Fixes: 179276 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing.
This commit resolves GitHub Issue #179276 by removing support for the deprecated 'io.flutter.automatically-register-plugins' and 'io.flutter.network-policy' Android manifest flags from the embedding loader and its unit test suite.
Fixes: 179276
Pre-launch Checklist
///).