Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions shell/common/switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,10 @@ Settings SettingsFromCommandLine(const fml::CommandLine& command_line) {
}
}

// Enable need for authentication codes for VM service communication, if
// Disable need for authentication codes for VM service communication, if
// specified.
// TODO(bkonyi): when authentication codes are enabled by default, change
// to 'DisableServiceAuthCodes' and un-negate.
settings.disable_service_auth_codes =
!command_line.HasOption(FlagForSwitch(Switch::EnableServiceAuthCodes));
command_line.HasOption(FlagForSwitch(Switch::DisableServiceAuthCodes));

// Checked mode overrides.
settings.disable_dart_asserts =
Expand Down
8 changes: 3 additions & 5 deletions shell/common/switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,9 @@ DEF_SWITCH(FlutterAssetsDir,
"Path to the Flutter assets directory.")
DEF_SWITCH(Help, "help", "Display this help text.")
DEF_SWITCH(LogTag, "log-tag", "Tag associated with log messages.")
// TODO(bkonyi): when authentication codes are enabled by default, change
// to 'disable-service-auth-codes' instead of 'enable-service-auth-codes'.
DEF_SWITCH(EnableServiceAuthCodes,
"enable-service-auth-codes",
"Enable the requirement for authentication codes for communicating"
DEF_SWITCH(DisableServiceAuthCodes,
"disable-service-auth-codes",
"Disable the requirement for authentication codes for communicating"
" with the VM service.")
DEF_SWITCH(StartPaused,
"start-paused",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ private static String[] getArgsFromIntent(Intent intent) {
if (intent.getBooleanExtra("start-paused", false)) {
args.add("--start-paused");
}
if (intent.getBooleanExtra("enable-service-auth-codes", false)) {
args.add("--enable-service-auth-codes");
if (intent.getBooleanExtra("disable-service-auth-codes", false)) {
args.add("--disable-service-auth-codes");
}
if (intent.getBooleanExtra("use-test-fonts", false)) {
args.add("--use-test-fonts");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public class FlutterShellArgs {
public static final String ARG_TRACE_STARTUP = "--trace-startup";
public static final String ARG_KEY_START_PAUSED = "start-paused";
public static final String ARG_START_PAUSED = "--start-paused";
public static final String ARG_KEY_ENABLE_SERVICE_AUTH_CODES = "enable-service-auth-codes";
public static final String ARG_ENABLE_SERVICE_AUTH_CODES = "--enable-service-auth-codes";
public static final String ARG_KEY_DISABLE_SERVICE_AUTH_CODES = "disable-service-auth-codes";
public static final String ARG_DISABLE_SERVICE_AUTH_CODES = "--disable-service-auth-codes";
public static final String ARG_KEY_USE_TEST_FONTS = "use-test-fonts";
public static final String ARG_USE_TEST_FONTS = "--use-test-fonts";
public static final String ARG_KEY_ENABLE_DART_PROFILING = "enable-dart-profiling";
Expand Down Expand Up @@ -58,10 +58,8 @@ public static FlutterShellArgs fromIntent(@NonNull Intent intent) {
if (intent.getBooleanExtra(ARG_KEY_START_PAUSED, false)) {
args.add(ARG_START_PAUSED);
}
// TODO(bkonyi): when authentication codes are enabled by default, change
// to 'disable-service-auth-codes' instead of 'enable-service-auth-codes'.
if (intent.getBooleanExtra(ARG_KEY_ENABLE_SERVICE_AUTH_CODES, false)) {
args.add(ARG_ENABLE_SERVICE_AUTH_CODES);
if (intent.getBooleanExtra(ARG_KEY_DISABLE_SERVICE_AUTH_CODES, false)) {
args.add(ARG_DISABLE_SERVICE_AUTH_CODES);
}
if (intent.getBooleanExtra(ARG_KEY_USE_TEST_FONTS, false)) {
args.add(ARG_USE_TEST_FONTS);
Expand Down