[Android] Wire command line shell arguments to the embedding through the manifest instead of an Intent#180591
Open
camsim99 wants to merge 120 commits into
Open
[Android] Wire command line shell arguments to the embedding through the manifest instead of an Intent#180591camsim99 wants to merge 120 commits into
Intent#180591camsim99 wants to merge 120 commits into
Conversation
gmackall
previously approved these changes
May 5, 2026
gmackall
left a comment
Member
There was a problem hiding this comment.
lgtm outside of route question
| 'enable-hcpp-and-surface-control', | ||
| 'true', | ||
| ], | ||
| if (route != null) ...<String>['--route=$route'], |
Member
There was a problem hiding this comment.
does this not need the "es" from before?
if (route != null) ...<String>['--es', 'route', route],?
Contributor
Author
There was a problem hiding this comment.
Yes, you're right. Will fix and make sure a test case covers this.
Contributor
Author
4 tasks
…f manifest merging to send flags to the embedding
|
CI had a failure that stopped further tests from running. We need to investigate to determine the root cause. SHA at time of execution: b434745. Possible causes:
A blank commit, or merging to head, will be required to resume running CI for this PR. Error Details: Stack trace: |
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modifies the way that the Flutter tool sends command line flags to the embedding to eliminate the pre-existing dependence on passing them via
Intentextras.Specifically, this PR modifies the tool to (1) encode the flags into JSON, (2) create an extra manifest file that encode that JSON as manifest metadata via a custom Gradle task, and (3) instructs Gradle to merge that generated manifest into the final produced manifest. On the Flutter Android embedding side, the flags are decoded from JSON and loaded as before.
Note
This PR is technically a breaking change because users of the
--use-application-binaryflag wishing to avoid rebuilding the APK will get their APK rebuilt if the flags have changed between running that APK.This is required with this approach because the flags are encoded in the manifest, so the manifest will have to be regenerated if the flags change. This will not require any action from the developer and a warning will be printed if the APK has to be rebuilt against their wishes.
A quick test of the time it take to render the first Flutter frame when using
--use-application-binarydemonstrates that this change is not the bottleneck when running prebuilt APKs:For more context, see the one-pager for this design go/flutter-android-no-more-intents. Part of #180686.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.