Dump WindowContainer SurfaceControls to proto

Test: Data appears in Winscope
Bug: 197712697
Change-Id: I5a2704f4e910529d81698768a6e657e4f823d829
This commit is contained in:
Pablo Gamito
2021-09-01 15:26:50 +00:00
parent 120ee45bd0
commit afaa2fedf0
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

@@ -51,6 +51,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;
@@ -2393,6 +2394,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++) {