diff --git a/engine/src/flutter/runtime/BUILD.gn b/engine/src/flutter/runtime/BUILD.gn index 7ec3b860bb..952ed30e1b 100644 --- a/engine/src/flutter/runtime/BUILD.gn +++ b/engine/src/flutter/runtime/BUILD.gn @@ -92,9 +92,10 @@ source_set("runtime") { defines = [] - if (current_toolchain == host_toolchain) { + if (flutter_runtime_mode == "debug" || current_toolchain == host_toolchain) { # Though the test font data is small, we dont want to add to the binary size - # on the device. We only add the same on the host test shells. + # on the device (in profile and release modes). We only add the same on the + # host test shells and the debug device shell. defines += [ "EMBED_TEST_FONT_DATA=1" ] } diff --git a/engine/src/flutter/shell/platform/android/io/flutter/app/FlutterActivity.java b/engine/src/flutter/shell/platform/android/io/flutter/app/FlutterActivity.java index 0a6bba79e3..d9b78bb1ba 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/app/FlutterActivity.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/app/FlutterActivity.java @@ -33,6 +33,9 @@ public class FlutterActivity extends Activity { if (intent.getBooleanExtra("start-paused", false)) { args.add("--start-paused"); } + if (intent.getBooleanExtra("use-test-fonts", false)) { + args.add("--use-test-fonts"); + } if (intent.getBooleanExtra("enable-dart-profiling", false)) { args.add("--enable-dart-profiling"); }