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

Commit fc31cb4b authored by Ben Lin's avatar Ben Lin
Browse files

schedule a PIP update even when the previous stack is the current stack.

From commit 6db8fb27, we now only create
a new stack when there is more than one activity inside the PIP stack.
Additionally, when we expand (exit PIP), we no longer reparent to a
fullscreen stack - we simply do a windowing mode change on the existing
stack.

For expanding, the behavior is now that prevStack == currentStack, so
removing this condition.
For entering PIP, it is still possible that prevStack != currentStack
(multi. activity case) - in that case, we need to ensure one of the new
stack is in pinned mode.

Bug: 144824244
Test: Open Play Movies in portrait mode, play any movie - hit home to
enter PIP. Expand PIP. No longer experience black screen; see from logs
that scheduleUpdatePictureInPictureIfNeeded is called.

Change-Id: I3232d74110618919fcacbc9edd4eb3cb02f55015
parent dd07c258
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2502,8 +2502,8 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {

    void scheduleUpdatePictureInPictureModeIfNeeded(Task task, ActivityStack prevStack) {
        final ActivityStack stack = task.getStack();
        if (prevStack == null || prevStack == stack
                || (!prevStack.inPinnedWindowingMode() && !stack.inPinnedWindowingMode())) {
        if ((prevStack == null || (prevStack != stack
                && !prevStack.inPinnedWindowingMode() && !stack.inPinnedWindowingMode()))) {
            return;
        }