diff --git a/core/java/android/app/PictureInPictureUiState.java b/core/java/android/app/PictureInPictureUiState.java index 3d2cb3ffa58de..32ce89ae98cf9 100644 --- a/core/java/android/app/PictureInPictureUiState.java +++ b/core/java/android/app/PictureInPictureUiState.java @@ -42,7 +42,20 @@ public final class PictureInPictureUiState implements Parcelable { } /** - * Returns whether Picture-in-Picture is stashed or not. + * Returns whether Picture-in-Picture is stashed or not. A stashed PiP means it is only + * partially visible to the user, with some parts of it being off-screen. This is usually + * an UI state that is triggered by the user, such as flinging the PiP to the edge or letting go + * of PiP while dragging partially off-screen. + * + * Developers can use this in conjunction with + * {@link Activity#onPictureInPictureUiStateChanged(PictureInPictureUiState)} to get a signal + * when the PiP stash state has changed. For example, if the state changed from {@code false} to + * {@code true}, developers can choose to temporarily pause video playback if PiP is of video + * content. Vice versa, if changing from {@code true} to {@code false} and video content is + * paused, developers can resumevideo playback. + * + * @see + * Picture in Picture (PiP) improvements */ public boolean isStashed() { return mIsStashed;