Loading services/core/java/com/android/server/wm/WindowManagerService.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -3934,7 +3934,13 @@ public class WindowManagerService extends IWindowManager.Stub return null; return null; } } // The bounds returned by the task represent the task's position on the screen. However, // we need to specify a crop relative to the task's surface control. Therefore, shift // the task's bounds to 0,0 so that we have the correct size and position within the // task's surface control. task.getBounds(mTmpRect); task.getBounds(mTmpRect); mTmpRect.offsetTo(0, 0); final SurfaceControl sc = task.getSurfaceControl(); final SurfaceControl sc = task.getSurfaceControl(); final SurfaceControl.ScreenshotHardwareBuffer buffer = SurfaceControl.captureLayers( final SurfaceControl.ScreenshotHardwareBuffer buffer = SurfaceControl.captureLayers( layerCaptureArgsBuilder.setLayer(sc).setSourceCrop(mTmpRect).build()); layerCaptureArgsBuilder.setLayer(sc).setSourceCrop(mTmpRect).build()); Loading Loading
services/core/java/com/android/server/wm/WindowManagerService.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -3934,7 +3934,13 @@ public class WindowManagerService extends IWindowManager.Stub return null; return null; } } // The bounds returned by the task represent the task's position on the screen. However, // we need to specify a crop relative to the task's surface control. Therefore, shift // the task's bounds to 0,0 so that we have the correct size and position within the // task's surface control. task.getBounds(mTmpRect); task.getBounds(mTmpRect); mTmpRect.offsetTo(0, 0); final SurfaceControl sc = task.getSurfaceControl(); final SurfaceControl sc = task.getSurfaceControl(); final SurfaceControl.ScreenshotHardwareBuffer buffer = SurfaceControl.captureLayers( final SurfaceControl.ScreenshotHardwareBuffer buffer = SurfaceControl.captureLayers( layerCaptureArgsBuilder.setLayer(sc).setSourceCrop(mTmpRect).build()); layerCaptureArgsBuilder.setLayer(sc).setSourceCrop(mTmpRect).build()); Loading