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

Commit b0cf4c66 authored by Jorge Gil's avatar Jorge Gil Committed by Automerger Merge Worker
Browse files

Merge "Allow overridding the exitPip destination bounds" into tm-qpr-dev am:...

Merge "Allow overridding the exitPip destination bounds" into tm-qpr-dev am: 67fb0d15 am: 2976f7c9

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



Change-Id: Ia5df416d49460fac13cbaab4c7c182dc6fae7d6f
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 3b6350f6 2976f7c9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -434,7 +434,7 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
            }
        }

        final Rect destinationBounds = mPipBoundsState.getDisplayBounds();
        final Rect destinationBounds = getExitDestinationBounds();
        final int direction = syncWithSplitScreenBounds(destinationBounds, requestEnterSplit)
                ? TRANSITION_DIRECTION_LEAVE_PIP_TO_SPLIT_SCREEN
                : TRANSITION_DIRECTION_LEAVE_PIP;
@@ -489,6 +489,11 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
        });
    }

    /** Returns the bounds to restore to when exiting PIP mode. */
    public Rect getExitDestinationBounds() {
        return mPipBoundsState.getDisplayBounds();
    }

    private void exitLaunchIntoPipTask(WindowContainerTransaction wct) {
        wct.startTask(mTaskInfo.launchIntoPipHostTaskId, null /* ActivityOptions */);
        mTaskOrganizer.applyTransaction(wct);