From b485f3d40cf6163e5fd2d676054a2ff7dcecf9f5 Mon Sep 17 00:00:00 2001 From: Hongwei Wang Date: Wed, 22 Feb 2023 17:54:31 +0000 Subject: [PATCH] Revert "Enable protolog by default for WMShell" This reverts commit 4005c0e25c49213834b8f94ce1ba98a35e40246f. Reason for revert: Investigating b/270060008 Bug: 270060008 Change-Id: Ied9c1088280aa654fb5d499229d066995f47dfb5 --- .../Shell/src/com/android/wm/shell/ProtoLogController.java | 5 ----- .../src/com/android/wm/shell/protolog/ShellProtoLogImpl.java | 3 ++- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/ProtoLogController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/ProtoLogController.java index e2012b4e36dc9..88525aabe53b3 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/ProtoLogController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/ProtoLogController.java @@ -16,8 +16,6 @@ package com.android.wm.shell; -import android.os.Build; - import com.android.wm.shell.protolog.ShellProtoLogImpl; import com.android.wm.shell.sysui.ShellCommandHandler; import com.android.wm.shell.sysui.ShellInit; @@ -43,9 +41,6 @@ public class ProtoLogController implements ShellCommandHandler.ShellCommandActio void onInit() { mShellCommandHandler.addCommandCallback("protolog", this, this); - if (Build.IS_DEBUGGABLE) { - mShellProtoLog.startProtoLog(null /* PrintWriter */); - } } @Override diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogImpl.java b/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogImpl.java index c59c42dadb9dc..93ffb3dc8115e 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogImpl.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogImpl.java @@ -31,7 +31,8 @@ import java.io.PrintWriter; */ public class ShellProtoLogImpl extends BaseProtoLogImpl { private static final String TAG = "ProtoLogImpl"; - private static final int BUFFER_CAPACITY = 128 * 1024; + private static final int BUFFER_CAPACITY = 1024 * 1024; + // TODO: find a proper location to save the protolog message file private static final String LOG_FILENAME = "/data/misc/wmtrace/shell_log.winscope"; private static final String VIEWER_CONFIG_FILENAME = "/system_ext/etc/wmshell.protolog.json.gz";