Skip to content

Add cold boot option to emulator launch command - #82647

Merged
fluttergithubbot merged 1 commit into
flutter:masterfrom
Hamdor:add_cold_boot_launch_option
May 19, 2021
Merged

fluttergithubbot merged 1 commit into
flutter:masterfrom
Hamdor:add_cold_boot_launch_option

Conversation

@Hamdor

@Hamdor Hamdor commented May 16, 2021 •

Copy link
Copy Markdown
Contributor

The cold boot option is only available for AVD.

This PR implements the following feature request: #56828

closes #56828

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 16, 2021
@google-cla google-cla Bot added the cla: yes label May 16, 2021

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.

You can write this more compactly using an if in the list literal:

final List<String> cmd = <String>[
  _androidSdk.emulatorPath,
  '-avd',
  id,
  if (cold)
    '-no-snapshot-load',
];

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.

nit: use a ...:

final List<String> kEmulatorLauchColdBootCommand = <String>[...kEmulatorLaunchCommand, '-no-snapshot-load'];

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.

I would name this coldBoot

The cold boot option is only available for AVD.
@Hamdor
Hamdor force-pushed the add_cold_boot_launch_option branch from f761845 to 41fdcf5 Compare May 19, 2021 07:27
@Hamdor

Hamdor commented May 19, 2021

Copy link
Copy Markdown
Contributor Author

@jonahwilliams, thank you for the review. I addressed your findings in the latest commit.

@jonahwilliams jonahwilliams 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flutter emulator --launch --coldboot feature request

3 participants