)]}'
{
  "commit": "69723cd0cd97d4e56f7b2666a8bcc7bd126e41bb",
  "tree": "f72ce86a67360f39035282ae78b34983b3aa69ba",
  "parents": [
    "fd94ffdcc5d5c87af792d6b358abb8aefa37a790"
  ],
  "author": {
    "name": "Camille Simon",
    "email": "43054281+camsim99@users.noreply.github.com",
    "time": "Tue Mar 17 15:39:10 2026 -0700"
  },
  "committer": {
    "name": "dart-internal-monorepo",
    "email": "dart-internal-monorepo@dart-ci-internal.iam.gserviceaccount.com",
    "time": "Tue Mar 17 18:36:37 2026 -0700"
  },
  "message": "Reland \"[Android] Add mechanism for setting Android engine flags via Android manifest (take 2)\" (#182522)\n\n### Overview\nRe-lands https://github.com/flutter/flutter/pull/181632 which TLDR does\nthe following:\n\n**Same old same old changes from original PR**\n- Refactors all engine flags recognized by the Flutter Android embedding\n(specifically those previously recognized by\n[`FlutterShellArgs`](https://github.com/flutter/flutter/blob/4f5478cce38d837e14b7a032a12500d3fc0f1310/engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java)\nand all of those used to initialize the engine in `FlutterLoader`) into\na new class `FlutterEngineFlags` (`FlutterShellArgs` is kept for now to\nmaintain backwards compatibility; see\nhttps://github.com/flutter/flutter/issues/182153 for details)\n- Adds the ability to set engine flags (that are recognized by\n`FlutterEngineFlags`) via the manifest\n- Adds warnings for developers that set engine flags via `Intent`s as\nthis will be disabled as part of\nhttps://github.com/flutter/flutter/issues/180686.\n- Disallows debug/test only flags in release mode\n\n**New changes/fixes**\n\n\u003e [!NOTE]\n\u003e This re-land was required because when previously submitted, it caused\nb/483299339. I have confirmed that this bug has been fixed in this PR;\nsee go/flutter-android-setting-flags-in-manifest-perf-comparison for A/B\ntest results with the previous version of this PR\n(https://github.com/flutter/flutter/pull/181632) and commit\nhttps://github.com/flutter/flutter/pull/182522/commits/d6d4a07ede2052db4a861528ff05df8175bd9d37\nof this PR.\n\n- [Critical change] To fix the bug caught by b/483299339,\n`--merged-platform-ui-thread` flag is added to `FlutterEngineFlag`s\n- [Behavior change, not critical] To avoid more bugs like b/483299339,\n`FlutterLoader` allows unrecognized flags specified by the command line\nor `Intent` extras to be used to initialize the engine for now (same\nbehavior as before my original change but I plan to secure this in the\nfuture; see https://github.com/flutter/flutter/issues/182557)\n- [Small refactor] To speed up manifest argument processing time,\n`FlutterLoader` loops through all recognized `FlutterEngineFlag`s to\ncheck if they are present in an application\u0027s manifest versus looping\nthrough all metadata in an application\u0027s manifest and looking for\nrecognized `FlutterEngineFlag`s (small improvement for apps with large\nmanifests)\n- [Small refactor] To speed up command line argument processing time,\n`FlutterLoader` processes the `--aot-shared-library-name` flag in the\nsame loop as the other flags, reducing the number of loops\n`ensureInitializationComplete` has to do (minimal improvement perf-wise\nbut kept it in because it\u0027s more readable to me)\n\n### Full description\n(Mostly copied from https://github.com/flutter/flutter/pull/181632)\n\n\u003e [!NOTE]\n\u003e This PR is based on conversation \u0026 feedback on\ngo/flutter-android-harden-engine-shell-arguments.\n\nAdds a mechanism for setting Android engine flags via the manifest. If a\nflag is specified on the command line and in manifest metadata, the\nvalue specified on the command line will take precedence. Documentation\nis added on this mechanism\n\nAdditionally, this PR removes the exposure of`--cache-sksl` command line\nflag as per\n[https://github.com/flutter/flutter/issues/140310#issuecomment-2708459007](https://www.google.com/url?q\u003dhttps://github.com/flutter/flutter/issues/140310%23issuecomment-2708459007\u0026sa\u003dD\u0026source\u003ddocs\u0026ust\u003d1761156167162464\u0026usg\u003dAOvVaw3a8ubXTtv3apknY2-P9dKe).\n\nAdditionally, this PR adds documentation for the only two supported ways\nof setting engine flags moving forward -- via the command line or\nmanifest. The `Intent` mechanism will be removed when\nhttps://github.com/flutter/flutter/issues/180686 is completed (intended\nto be a follow up to this PR).\n\nAs the unit tests in this PR only cover setting flags via manifest in\ndebug mode, I will follow up this PR with an integration test to test\nthat flags are appropriately respected/ignored in release mode. See\nhttps://github.com/flutter/flutter/pull/178383 for my currently working\nbut WIP draft.\n\nPart of https://github.com/flutter/flutter/issues/172553.\n\n# Follow up work:\n\n- [ ] **Migrate flags all un-migrated flags `FlutterEngineFlags`**\nhttps://github.com/flutter/flutter/issues/182852\n- [ ] **Add integration test for this new added mechanism.** This will\nland as an immediate follow-up to this PR. WIP in\nhttps://github.com/flutter/flutter/pull/182241.\n- [ ] **Remove support for setting shell arguments via `Intent`.** This\ntask will be a follow up to this work + the integration test landing,\nand will complete work for\nhttps://github.com/flutter/flutter/issues/172553. See\nhttps://github.com/flutter/flutter/issues/180686 for details.\n- [ ] **Only allow known engine flags to be passed to the engine.** This\nis more of a P2 but would be a nice additional security feature; see\nhttps://github.com/flutter/flutter/issues/182557.\n\n## Pre-launch Checklist\n\n- [x] I read the [Contributor Guide] and followed the process outlined\nthere for submitting PRs.\n- [x] I read the [Tree Hygiene] wiki page, which explains my\nresponsibilities.\n- [x] I read and followed the [Flutter Style Guide], including [Features\nwe expect every widget to implement].\n- [x] I signed the [CLA].\n- [x] I listed at least one issue that this PR fixes in the description\nabove.\n- [x] I updated/added relevant documentation (doc comments with `///`).\n- [x] I added new tests to check the change I am making, or this PR is\n[test-exempt].\n- [x] I followed the [breaking change policy] and added [Data Driven\nFixes] where supported.\n- [x] All existing and new tests are passing.\n\nIf you need help, consider asking for advice on the #hackers-new channel\non [Discord].\n\n**Note**: The Flutter team is currently trialing the use of [Gemini Code\nAssist for\nGitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).\nComments from the `gemini-code-assist` bot should not be taken as\nauthoritative feedback from the Flutter team. If you find its comments\nuseful you can update your code accordingly, but if you are unsure or\ndisagree with the feedback, please feel free to wait for a Flutter team\nmember\u0027s review for guidance on which automated comments should be\naddressed.\n\n\u003c!-- Links --\u003e\n[Contributor Guide]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview\n[Tree Hygiene]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md\n[test-exempt]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests\n[Flutter Style Guide]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md\n[Features we expect every widget to implement]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement\n[CLA]: https://cla.developers.google.com/\n[flutter/tests]: https://github.com/flutter/tests\n[breaking change policy]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes\n[Discord]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md\n[Data Driven Fixes]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md\n\n---------\n\nCo-authored-by: gemini-code-assist[bot] \u003c176961590+gemini-code-assist[bot]@users.noreply.github.com\u003e\nhttps://dart.googlesource.com/external/github.com/flutter/flutter/+/994b73f795ee7c5d0026d52c4b8be25334d673e4\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "adc8eaf9b8c0aade4d37f160411f8ce80124b23c",
      "old_mode": 33188,
      "old_path": "DEPS",
      "new_id": "f8b7bda0094dccb3ee196b897cc3617f53fda4f0",
      "new_mode": 33188,
      "new_path": "DEPS"
    },
    {
      "type": "modify",
      "old_id": "97b52671f17724c112060ae0eefda5c78ad1a853",
      "old_mode": 33188,
      "old_path": "commits.json",
      "new_id": "0f53f7a7949503a6b45a1d119318c03000cae56b",
      "new_mode": 33188,
      "new_path": "commits.json"
    }
  ]
}
