From d73e56bff3305c50a210ba032bac284f45bd79f2 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 10 Apr 2017 15:41:09 -0700 Subject: [PATCH] Package test fonts on the debug runtime mode. (flutter/engine#3582) --- engine/src/flutter/runtime/BUILD.gn | 5 +++-- .../platform/android/io/flutter/app/FlutterActivity.java | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) 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"); }