Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14ce9644 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

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
parent c1b14f8a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;