summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2017-11-16 16:35:22 -0800
committer Vishnu Nair <vishnun@google.com> 2017-11-16 17:07:59 -0800
commit14ce96449e328f7ebfbbfe176c36ed4bf0d2e4aa (patch)
treef0bdc2e22dddd879d25b34aca0c6a6a6c65dea84
parentc1b14f8a61aa6263cd6cbd67e8b7a082304b0c4f (diff)
Add read permissions to wm trace file
- rename window trace file path to use common location Bug: 64831661 Test: adb shell cmd window tracing start && adb shell cmd window tracing stop && adb bugreport ~/tmp.zip; Change-Id: I85fb8e29477f8512120359571e4ef96929d65917
-rw-r--r--services/core/java/com/android/server/wm/WindowTracing.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowTracing.java b/services/core/java/com/android/server/wm/WindowTracing.java
index 5657f6c4f9c5..6aa51016ebe9 100644
--- a/services/core/java/com/android/server/wm/WindowTracing.java
+++ b/services/core/java/com/android/server/wm/WindowTracing.java
@@ -67,6 +67,7 @@ class WindowTracing {
mWriteQueue.clear();
mTraceFile.delete();
try (OutputStream os = new FileOutputStream(mTraceFile)) {
+ mTraceFile.setReadable(true, false);
ProtoOutputStream proto = new ProtoOutputStream(os);
proto.write(MAGIC_NUMBER, MAGIC_NUMBER_VALUE);
proto.flush();
@@ -147,7 +148,7 @@ class WindowTracing {
}
static WindowTracing createDefaultAndStartLooper(Context context) {
- File file = new File("/data/system/window_trace.proto");
+ File file = new File("/data/misc/wmtrace/wm_trace.pb");
WindowTracing windowTracing = new WindowTracing(file);
new Thread(windowTracing::loop, "window_tracing").start();
return windowTracing;