From a8bff9707d102c248fd4b6f41ad093c19d56e623 Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Tue, 3 Dec 2019 10:18:10 -0800 Subject: [PATCH] Fix SurfaceControl#captureLayers docs Fixes: 144514274 Test: docs Change-Id: I31c80db594982174910974a6f385dae5f0e224ce --- core/java/android/view/SurfaceControl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java index 6458737d326d5..642b05daca9e7 100644 --- a/core/java/android/view/SurfaceControl.java +++ b/core/java/android/view/SurfaceControl.java @@ -1863,7 +1863,9 @@ public final class SurfaceControl implements Parcelable { * * @param layer The root layer to capture. * @param sourceCrop The portion of the root surface to capture; caller may pass in 'new - * Rect()' or null if no cropping is desired. + * Rect()' or null if no cropping is desired. If the root layer does not + * have a buffer or a crop set, then a non-empty source crop must be + * specified. * @param frameScale The desired scale of the returned buffer; the raw * screen will be scaled up/down. * @@ -1880,7 +1882,9 @@ public final class SurfaceControl implements Parcelable { * * @param layer The root layer to capture. * @param sourceCrop The portion of the root surface to capture; caller may pass in 'new - * Rect()' or null if no cropping is desired. + * Rect()' or null if no cropping is desired. If the root layer does not + * have a buffer or a crop set, then a non-empty source crop must be + * specified. * @param frameScale The desired scale of the returned buffer; the raw * screen will be scaled up/down. * @param format The desired pixel format of the returned buffer.