Skip to content

[Android] Updating breaking change page on restricting engine config flags - #13931

Merged
camsim99 merged 4 commits into
mainfrom
update_intent_bcp
Sep 30, 2026
Merged

camsim99 merged 4 commits into
mainfrom
update_intent_bcp

Conversation

@camsim99

@camsim99 camsim99 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

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

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@flutter-website-bot

flutter-website-bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@lamek
lamek self-requested a review September 30, 2026 04:40

@lamek lamek left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I added one thing to update and a request for a redirect.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to this (add a dash before "xml"): declare-engine-flags-in-androidmanifest-xml

@lamek

lamek commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

@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 },

@camsim99
camsim99 merged commit d78d4be into main Sep 30, 2026
14 checks passed
@camsim99
camsim99 deleted the update_intent_bcp branch September 30, 2026 17:23
leehack pushed a commit to leehack/flutter that referenced this pull request Oct 3, 2026
… 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]>
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
… 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants