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

Commit 0adb9dce authored by Hongwei Wang's avatar Hongwei Wang Committed by Automerger Merge Worker
Browse files

Merge "Allow other app enter PiP when exiting current one" into tm-qpr-dev am:...

Merge "Allow other app enter PiP when exiting current one" into tm-qpr-dev am: 8df0cf45 am: 62a5b944

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



Change-Id: I134d9c1adf8c772c418f36502b91b514ceade476
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 037eb98e 62a5b944
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -966,7 +966,7 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
        // Re-set the PIP bounds to none.
        mPipBoundsState.setBounds(new Rect());
        mPipUiEventLoggerLogger.setTaskInfo(null);
        mMainExecutor.executeDelayed(() -> mPipMenuController.detach(), 0);
        mPipMenuController.detach();
        mLeash = null;

        if (info.displayId != Display.DEFAULT_DISPLAY && mOnDisplayIdChangeCallback != null) {
+8 −0
Original line number Diff line number Diff line
@@ -4459,6 +4459,14 @@ class Task extends TaskFragment {
            // transferring the transform on the leash to the task, reset this state once we're
            // moving out of pip
            setCanAffectSystemUiFlags(true);
            // Turn on userLeaveHint so other app can enter PiP mode.
            mTaskSupervisor.mUserLeaving = true;
            // Allow entering PiP from current top most activity when we are leaving PiP.
            final Task topFocused = mRootWindowContainer.getTopDisplayFocusedRootTask();
            if (topFocused != null) {
                final ActivityRecord ar = topFocused.getTopResumedActivity();
                enableEnterPipOnTaskSwitch(ar, null /* toFrontTask */, ar, null /* opts */);
            }
            mRootWindowContainer.notifyActivityPipModeChanged(this, null);
        }
        if (likelyResolvedMode == WINDOWING_MODE_PINNED) {