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

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

Merge "Revert^2: Fix pip enter/expand from split-screen secondary." into rvc-dev am: d4551c1d

Change-Id: Icd1c09ea06d65028fb65aa1ddfce5a1820d57140
parents 200b5204 d4551c1d
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -552,6 +552,9 @@ public class PipTaskOrganizer extends TaskOrganizer {
                    ? null : destinationBounds;
                    ? null : destinationBounds;
            // As for the final windowing mode, simply reset it to undefined.
            // As for the final windowing mode, simply reset it to undefined.
            wct.setWindowingMode(mToken, WINDOWING_MODE_UNDEFINED);
            wct.setWindowingMode(mToken, WINDOWING_MODE_UNDEFINED);
            if (mSplitDivider != null && direction == TRANSITION_DIRECTION_TO_SPLIT_SCREEN) {
                wct.reparent(mToken, mSplitDivider.getSecondaryRoot(), true /* onTop */);
            }
        } else {
        } else {
            taskBounds = destinationBounds;
            taskBounds = destinationBounds;
        }
        }
+8 −0
Original line number Original line Diff line number Diff line
@@ -813,4 +813,12 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
            updateVisibility(true /* visible */);
            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 Original line Diff line number Diff line
@@ -1286,12 +1286,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        }
        }


        if (stack != null && stack.topRunningActivity() == this) {
        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
            // make ensure the TaskOrganizer still works after re-parenting
            if (firstWindowDrawn) {
            if (firstWindowDrawn) {
                stack.setHasBeenVisible(true);
                stack.setHasBeenVisible(true);
@@ -7785,6 +7779,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A


    void setPictureInPictureParams(PictureInPictureParams p) {
    void setPictureInPictureParams(PictureInPictureParams p) {
        pictureInPictureArgs.copyOnlySet(p);
        pictureInPictureArgs.copyOnlySet(p);
        getTask().getRootTask().setPictureInPictureParams(p);
        getTask().getRootTask().onPictureInPictureParamsChanged();
    }
    }
}
}
+4 −2
Original line number Original line 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
        // 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.
        // no need to resolve the windowing mode again as it is already resolved to the right mode.
        if (!creating) {
        if (!creating) {
            windowingMode = taskDisplayArea.validateWindowingMode(windowingMode,
            if (!taskDisplayArea.isValidWindowingMode(windowingMode, null /* ActivityRecord */,
                    null /* ActivityRecord */, topTask, getActivityType());
                    topTask, getActivityType())) {
                windowingMode = WINDOWING_MODE_UNDEFINED;
            }
        }
        }
        if (taskDisplayArea.getRootSplitScreenPrimaryTask() == this
        if (taskDisplayArea.getRootSplitScreenPrimaryTask() == this
                && windowingMode == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY) {
                && windowingMode == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY) {
+1 −0
Original line number Original line Diff line number Diff line
@@ -1440,6 +1440,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
        mService.deferWindowLayout();
        mService.deferWindowLayout();
        try {
        try {
            stack.setWindowingMode(WINDOWING_MODE_UNDEFINED);
            stack.setWindowingMode(WINDOWING_MODE_UNDEFINED);
            stack.setBounds(null);
            if (toDisplay.getDisplayId() != stack.getDisplayId()) {
            if (toDisplay.getDisplayId() != stack.getDisplayId()) {
                stack.reparent(toDisplay.getDefaultTaskDisplayArea(), false /* onTop */);
                stack.reparent(toDisplay.getDefaultTaskDisplayArea(), false /* onTop */);
            } else {
            } else {
Loading