Enable VM service authentication codes by default (flutter/engine#8594)
This commit is contained in:
@@ -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 =
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -296,8 +296,8 @@ public final class FlutterActivityDelegate
|
||||
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");
|
||||
|
||||
@@ -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";
|
||||
@@ -58,10 +58,8 @@ public class FlutterShellArgs {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user