From 2ff513855e83fe041ca07bf39e234c04fdbe14dc Mon Sep 17 00:00:00 2001 From: Aaron Labiaga Date: Tue, 1 Nov 2022 16:04:15 +0000 Subject: [PATCH] Update setSourceRectHint documentation Fixes: 256830128 Test: docs Change-Id: I4433b0da22f1c0e7dac43c16af0f3636bca5bb82 --- core/java/android/app/PictureInPictureParams.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/core/java/android/app/PictureInPictureParams.java b/core/java/android/app/PictureInPictureParams.java index 3f1844e2ba8a6..96d874ee110bf 100644 --- a/core/java/android/app/PictureInPictureParams.java +++ b/core/java/android/app/PictureInPictureParams.java @@ -157,13 +157,18 @@ public final class PictureInPictureParams implements Parcelable { } /** - * Sets the source bounds hint. These bounds are only used when an activity first enters - * picture-in-picture, and describe the bounds in window coordinates of activity entering - * picture-in-picture that will be visible following the transition. For the best effect, - * these bounds should also match the aspect ratio in the arguments. + * Sets the window-coordinate bounds of an activity transitioning to picture-in-picture. + * The bounds is the area of an activity that will be visible in the transition to + * picture-in-picture mode. For the best effect, these bounds should also match the + * aspect ratio in the arguments. + * + * In Android 12+ these bounds are also reused to improve the exit transition from + * picture-in-picture mode. See + * Support + * smoother animations when exiting out of PiP mode for more details. * * @param launchBounds window-coordinate bounds indicating the area of the activity that - * will still be visible following the transition into picture-in-picture (eg. the video + * will still be visible following the transition into picture-in-picture (e.g. the video * view bounds in a video player) * * @return this builder instance.