Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e14f080 authored by Ben Lin's avatar Ben Lin Committed by Automerger Merge Worker
Browse files

Merge "PiP: API - explain isStashed in more detail." into sc-dev am: 394f4792

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14284623

Change-Id: I7b4129ef245c0528f4a32ab21a08c359f1576e4e
parents 32be9742 394f4792
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -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 <a href="http://developer.android.com/about/versions/12/features/pip-improvements">
     *     Picture in Picture (PiP) improvements</a>
     */
    public boolean isStashed() {
        return mIsStashed;