diff options
| author | 2023-12-07 10:11:50 +0000 | |
|---|---|---|
| committer | 2023-12-07 10:11:50 +0000 | |
| commit | cd5f25b55390c070f12dd3783f2e22a3587caa55 (patch) | |
| tree | aedcdc1f08807b9532ba6c86b567f41e485a9a6e | |
| parent | 6ed42ea1c3b6df59bbf2fbe9f8eb95d44fd5f269 (diff) | |
Create flag for enabling layout tracing in SystemUI
Flag: ACONFIG enable_layout_tracing DISABLED
Bug: 315274804
Test: perfetto trace
Change-Id: I8626536a95b9e9febbe3744f53765f61cd6f4859
| -rw-r--r-- | packages/SystemUI/aconfig/systemui.aconfig | 7 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/SystemUIApplication.java | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig index c52a89c9b05e..086ec2438223 100644 --- a/packages/SystemUI/aconfig/systemui.aconfig +++ b/packages/SystemUI/aconfig/systemui.aconfig @@ -204,6 +204,13 @@ flag { } flag { + name: "enable_layout_tracing" + namespace: "systemui" + description: "Enables detailed traversal slices during measure and layout in perfetto traces" + bug: "315274804" +} + +flag { name: "quick_settings_visual_haptics_longpress" namespace: "systemui" description: "Enable special visual and haptic effects for quick settings tiles with long-press actions" diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java index bf445177f3f8..c3f64803758b 100644 --- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java @@ -110,6 +110,10 @@ public class SystemUIApplication extends Application implements View.setTracedRequestLayoutClassClass( SystemProperties.get("persist.debug.trace_request_layout_class", null)); + if (Flags.enableLayoutTracing()) { + View.setTraceLayoutSteps(true); + } + if (Process.myUserHandle().equals(UserHandle.SYSTEM)) { IntentFilter bootCompletedFilter = new IntentFilter(Intent.ACTION_LOCKED_BOOT_COMPLETED); |