diff --git a/core/java/android/app/UiAutomationConnection.java b/core/java/android/app/UiAutomationConnection.java index e693c5ea6c935..e016027329ac9 100644 --- a/core/java/android/app/UiAutomationConnection.java +++ b/core/java/android/app/UiAutomationConnection.java @@ -220,7 +220,9 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub { final long identity = Binder.clearCallingIdentity(); try { captureBuffer = SurfaceControl.captureLayers( - new SurfaceControl.LayerCaptureArgs.Builder(surfaceControl).build()); + new SurfaceControl.LayerCaptureArgs.Builder(surfaceControl) + .setChildrenOnly(false) + .build()); } finally { Binder.restoreCallingIdentity(identity); }