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
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user