diff --git a/shell/common/switches.cc b/shell/common/switches.cc index 6298772af988f..4d4ed1b86b628 100644 --- a/shell/common/switches.cc +++ b/shell/common/switches.cc @@ -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 = diff --git a/shell/common/switches.h b/shell/common/switches.h index b0ff32d9b45c1..7747c33bca44c 100644 --- a/shell/common/switches.h +++ b/shell/common/switches.h @@ -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", diff --git a/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java b/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java index 7e4cb402eb02f..f7d56d289270f 100644 --- a/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java +++ b/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java @@ -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"); diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java b/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java index 8a65a1430bb05..c2fab9f035b71 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java @@ -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 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);