Repository navigation
[Android] Updating breaking change page on restricting engine config flags - #13931
Conversation
|
Staged preview of the updated docs.flutter.dev site (updated for commit ae0633e): |
There was a problem hiding this comment.
Code Review
This pull request updates the breaking changes documentation to reflect restrictions on Android engine flags in release mode, replacing the older document with a more comprehensive guide. The new document details the embedding and CLI behaviors, along with migration paths for direct intent launches and hermetic build systems. Feedback is provided to use the more idiomatic FlutterFragment.withNewEngine() builder method in the Kotlin code examples.
…id-engine-flags-release-mode.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
| statically declare those flags in your `AndroidManifest.xml` | ||
| before compiling the release binary. | ||
| For details, refer to | ||
| [Declare engine flags in `AndroidManifest.xml`](#declare-engine-flags-in-androidmanifestxml). |
There was a problem hiding this comment.
Update to this (add a dash before "xml"): declare-engine-flags-in-androidmanifest-xml
|
@camsim99 Can you also add a redirect to sites/docs/firebase.json? { "source": "/release/breaking-changes/restrict-command-line-flags-prebuilt-android-release-binaries", "destination": "/release/breaking-changes/restrict-android-engine-flags-release-mode", "type": 301 }, |
… module (flutter#191924) Configures the Android embedding to ignore engine configuration flags set via `Intent` in release mode. All flag parsing from `Intent`s is also stripped from release engine binaries as an additional security measure. Also adds an integration test to ensure flags set via `Intent` are ignored for apps running in release mode. As part of this implementation, deprecates the internal interface method `FlutterActivityAndFragmentDelegate.Host.getFlutterShellArgs` which is to be replaced by`FlutterActivityAndFragmentDelegate.Host.getFlutterEngineFlags`. After a stable release, `getFlutterShellArgs` will be removed: flutter#193256. **This is not a breaking change; developers cannot override this interface.** They can only subclass `FlutterActivity` and `FlutterFragment` and call `getFlutterShellArgs` which will still work as intended with a deprecation notice. Fixes flutter#190461. Related issue: While working on this, I thought it would be good to track adding the ability to negate all flags because currently, presence-only boolean flags (like `--trace-startup`) cannot have their setting in the manifest negated by the command line, which is counter-intuitive: flutter#193354 Related PR: Made some updates to the breaking change page for this project for flutter/website#13931 (directly related to my `Flutter-Android-Engine-Flags.md` updates) (@camsim99 authored description) ## 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. --------- Co-authored-by: Camille Simon <[email protected]> Co-authored-by: Camille Simon <[email protected]>
… module (flutter#191924) Configures the Android embedding to ignore engine configuration flags set via `Intent` in release mode. All flag parsing from `Intent`s is also stripped from release engine binaries as an additional security measure. Also adds an integration test to ensure flags set via `Intent` are ignored for apps running in release mode. As part of this implementation, deprecates the internal interface method `FlutterActivityAndFragmentDelegate.Host.getFlutterShellArgs` which is to be replaced by`FlutterActivityAndFragmentDelegate.Host.getFlutterEngineFlags`. After a stable release, `getFlutterShellArgs` will be removed: flutter#193256. **This is not a breaking change; developers cannot override this interface.** They can only subclass `FlutterActivity` and `FlutterFragment` and call `getFlutterShellArgs` which will still work as intended with a deprecation notice. Fixes flutter#190461. Related issue: While working on this, I thought it would be good to track adding the ability to negate all flags because currently, presence-only boolean flags (like `--trace-startup`) cannot have their setting in the manifest negated by the command line, which is counter-intuitive: flutter#193354 Related PR: Made some updates to the breaking change page for this project for flutter/website#13931 (directly related to my `Flutter-Android-Engine-Flags.md` updates) (@camsim99 authored description) ## 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. --------- Co-authored-by: Camille Simon <[email protected]> Co-authored-by: Camille Simon <[email protected]>
Description of what this PR is changing or adding, and why:
Adds some corrections +renames to a breaking change page on restricting engine config flags for Android.
Issues fixed by this PR (if any):
Part of flutter/flutter#190461
PRs or commits this PR depends on (if any):
flutter/flutter#191924 (but this can land at any time)
Presubmit checklist
of 80 characters or fewer.