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

Commit a4be1b02 authored by Evan Rosky's avatar Evan Rosky Committed by Automerger Merge Worker
Browse files

Merge "Fix pip enter/expand from split-screen secondary." into rvc-dev am: 074701fa

Change-Id: I14ae8bc6833efae6a1d64ccf438f1eb0e8b27dda
parents f65a2aba 074701fa
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -552,6 +552,9 @@ public class PipTaskOrganizer extends TaskOrganizer {
                    ? null : destinationBounds;
            // As for the final windowing mode, simply reset it to undefined.
            wct.setWindowingMode(mToken, WINDOWING_MODE_UNDEFINED);
            if (mSplitDivider != null && direction == TRANSITION_DIRECTION_TO_SPLIT_SCREEN) {
                wct.reparent(mToken, mSplitDivider.getSecondaryRoot(), true /* onTop */);
            }
        } else {
            taskBounds = destinationBounds;
        }
+8 −0
Original line number Diff line number Diff line
@@ -813,4 +813,12 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
            updateVisibility(true /* visible */);
        }
    }

    /** @return the container token for the secondary split root task. */
    public WindowContainerToken getSecondaryRoot() {
        if (mSplits == null || mSplits.mSecondary == null) {
            return null;
        }
        return mSplits.mSecondary.token;
    }
}
+1 −7
Original line number Diff line number Diff line
@@ -1281,12 +1281,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        }

        if (stack != null && stack.topRunningActivity() == this) {
            // carry over the PictureInPictureParams to the parent stack without calling
            // TaskOrganizerController#dispatchTaskInfoChanged.
            // this is to ensure the stack holding up-to-dated pinned stack information
            // when activity is re-parented to enter pip mode, see also
            // RootWindowContainer#moveActivityToPinnedStack
            stack.mPictureInPictureParams.copyOnlySet(pictureInPictureArgs);
            // make ensure the TaskOrganizer still works after re-parenting
            if (firstWindowDrawn) {
                stack.setHasBeenVisible(true);
@@ -7769,6 +7763,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

    void setPictureInPictureParams(PictureInPictureParams p) {
        pictureInPictureArgs.copyOnlySet(p);
        getTask().getRootTask().setPictureInPictureParams(p);
        getTask().getRootTask().onPictureInPictureParamsChanged();
    }
}
+4 −2
Original line number Diff line number Diff line
@@ -702,8 +702,10 @@ class ActivityStack extends Task {
        // Need to make sure windowing mode is supported. If we in the process of creating the stack
        // no need to resolve the windowing mode again as it is already resolved to the right mode.
        if (!creating) {
            windowingMode = taskDisplayArea.validateWindowingMode(windowingMode,
                    null /* ActivityRecord */, topTask, getActivityType());
            if (!taskDisplayArea.isValidWindowingMode(windowingMode, null /* ActivityRecord */,
                    topTask, getActivityType())) {
                windowingMode = WINDOWING_MODE_UNDEFINED;
            }
        }
        if (taskDisplayArea.getRootSplitScreenPrimaryTask() == this
                && windowingMode == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY) {
+1 −0
Original line number Diff line number Diff line
@@ -1459,6 +1459,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
        mService.deferWindowLayout();
        try {
            stack.setWindowingMode(WINDOWING_MODE_UNDEFINED);
            stack.setBounds(null);
            if (toDisplay.getDisplayId() != stack.getDisplayId()) {
                stack.reparent(toDisplay.getDefaultTaskDisplayArea(), false /* onTop */);
            } else {
Loading