Merge "Add API for writing WM trace to file"

This commit is contained in:
Nataniel Borges
2022-01-24 17:41:59 +00:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 0 deletions

View File

@@ -540,6 +540,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.
*/

View File

@@ -5679,6 +5679,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();