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

Commit d9edbe7a authored by Nataniel Borges's avatar Nataniel Borges
Browse files

Add API for writing WM trace to file

Currently the API supports only starting or stopping the trace, and writes to file when the trace is stopped. However, in some scenarios we would like to maintain the trace active, and just dump the trace.

Bug: 205138504
Test: all API, check if files are created under /data/misc/wmtrace
Change-Id: Ia1d38ebcfd5a9d45e25bc7a29146aca54d4bdaf3
parent 86608e36
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -550,6 +550,11 @@ interface IWindowManager
     */
    void stopWindowTrace();

    /**
    * If window tracing is active, saves the window trace to file, otherwise does nothing
    */
    void saveWindowTraceToFile();

    /**
     * Returns true if window trace is enabled.
     */
+5 −0
Original line number Diff line number Diff line
@@ -5680,6 +5680,11 @@ public class WindowManagerService extends IWindowManager.Stub
        mWindowTracing.stopTrace(null /* printwriter */);
    }

    @Override
    public void saveWindowTraceToFile() {
        mWindowTracing.saveForBugreport(null /* printwriter */);
    }

    @Override
    public boolean isWindowTraceEnabled() {
        return mWindowTracing.isEnabled();