[DO NOT MERGE] Dump WindowContainer SurfaceControls to proto

Test: Data appears in Winscope
Bug: 197712697
Change-Id: I5a2704f4e910529d81698768a6e657e4f823d829
(cherry picked from commit afaa2fedf0)
This commit is contained in:
Pablo Gamito
2021-09-01 15:26:50 +00:00
committed by Nataniel Borges
parent 865a06b236
commit fd48767da7
2 changed files with 5 additions and 0 deletions

View File

@@ -480,6 +480,7 @@ message WindowContainerProto {
optional SurfaceAnimatorProto surface_animator = 4;
repeated WindowContainerChildProto children = 5;
optional IdentifierProto identifier = 6;
optional .android.view.SurfaceControlProto surface_control = 7;
}
/* represents a generic child of a WindowContainer */

View File

@@ -57,6 +57,7 @@ import static com.android.server.wm.WindowContainerProto.CONFIGURATION_CONTAINER
import static com.android.server.wm.WindowContainerProto.IDENTIFIER;
import static com.android.server.wm.WindowContainerProto.ORIENTATION;
import static com.android.server.wm.WindowContainerProto.SURFACE_ANIMATOR;
import static com.android.server.wm.WindowContainerProto.SURFACE_CONTROL;
import static com.android.server.wm.WindowContainerProto.VISIBLE;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ANIM;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
@@ -2428,6 +2429,9 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
if (mSurfaceAnimator.isAnimating()) {
mSurfaceAnimator.dumpDebug(proto, SURFACE_ANIMATOR);
}
if (mSurfaceControl != null) {
mSurfaceControl.dumpDebug(proto, SURFACE_CONTROL);
}
// add children to proto
for (int i = 0; i < getChildCount(); i++) {