summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hongwei Wang <hwwang@google.com> 2023-02-18 01:07:29 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-02-18 01:07:29 +0000
commit5d332d77881c24ffce319273d9bc2ee5d8bfaa07 (patch)
tree3e0e3355f6ec5e2bd1887c61539bbd43d1d27b18
parent1bb6275303bd9bd09d30eeaf112f0b3881fa1dba (diff)
parent25e295e19b53d7a73e8926686a36e437c827c9af (diff)
Merge "Enable protolog by default for WMShell" into tm-qpr-dev am: 25e295e19b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21451990 Change-Id: Ic835073d39273482eca0bb4a6cf01c18b22ac56d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/ProtoLogController.java5
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogImpl.java3
2 files changed, 6 insertions, 2 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 88525aabe53b..e2012b4e36dc 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/ProtoLogController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/ProtoLogController.java
@@ -16,6 +16,8 @@
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;
@@ -41,6 +43,9 @@ 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 93ffb3dc8115..c59c42dadb9d 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,8 +31,7 @@ import java.io.PrintWriter;
*/
public class ShellProtoLogImpl extends BaseProtoLogImpl {
private static final String TAG = "ProtoLogImpl";
- private static final int BUFFER_CAPACITY = 1024 * 1024;
- // TODO: find a proper location to save the protolog message file
+ private static final int BUFFER_CAPACITY = 128 * 1024;
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";