From 520e35acb27c9e66266c29caea1077b75ed848f1 Mon Sep 17 00:00:00 2001 From: Gityuan Date: Wed, 12 Feb 2020 07:08:03 +0800 Subject: [PATCH] support endless trace buffer (flutter/engine#16520) --- .../android/io/flutter/app/FlutterActivityDelegate.java | 3 +++ .../io/flutter/embedding/engine/FlutterShellArgs.java | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/engine/src/flutter/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java b/engine/src/flutter/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java index 7d50e16de0..3bd9d9a25f 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java @@ -317,6 +317,9 @@ public final class FlutterActivityDelegate if (intent.getBooleanExtra("disable-service-auth-codes", false)) { args.add("--disable-service-auth-codes"); } + if (intent.getBooleanExtra("endless-trace-buffer", false)) { + args.add("--endless-trace-buffer"); + } // NOTE: all flags provided with this argument are subject to filtering // based on a whitelist in shell/common/switches.cc. If any flag provided // is not present in the whitelist, the process will immediately diff --git a/engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java b/engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java index 6e671a2fda..d73c7f7ec6 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java @@ -26,6 +26,8 @@ public class FlutterShellArgs { public static final String ARG_START_PAUSED = "--start-paused"; 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_ENDLESS_TRACE_BUFFER = "endless-trace-buffer"; + public static final String ARG_ENDLESS_TRACE_BUFFER = "--endless-trace-buffer"; 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"; @@ -71,6 +73,9 @@ public class FlutterShellArgs { if (intent.getBooleanExtra(ARG_KEY_DISABLE_SERVICE_AUTH_CODES, false)) { args.add(ARG_DISABLE_SERVICE_AUTH_CODES); } + if (intent.getBooleanExtra(ARG_KEY_ENDLESS_TRACE_BUFFER, false)) { + args.add(ARG_ENDLESS_TRACE_BUFFER); + } if (intent.getBooleanExtra(ARG_KEY_USE_TEST_FONTS, false)) { args.add(ARG_USE_TEST_FONTS); }