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

Commit d64a037d authored by Louis Chang's avatar Louis Chang
Browse files

Fix pip activity remained in PAUSING state

The enter-pip activity was reparented to a newly created task
because the original host task contains more than one activity.
However, the pip activity remained in PAUSING state because
the task pausing activity was null and therefore the activity
didn't schedule to pause.

Bug: 213541422
Test: atest PinnedStackTests
Change-Id: I1aea45f70eb3983dc9859585321258813ee62af7
parent 8eee52bf
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3521,10 +3521,9 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                mRootWindowContainer.moveActivityToPinnedRootTask(r,
                        null /* launchIntoPipHostActivity */, "enterPictureInPictureMode",
                        transition);
                final Task task = r.getTask();
                // Continue the pausing process after entering pip.
                if (task.getPausingActivity() == r) {
                    task.schedulePauseActivity(r, false /* userLeaving */,
                if (r.isState(PAUSING)) {
                    r.getTask().schedulePauseActivity(r, false /* userLeaving */,
                            false /* pauseImmediately */, "auto-pip");
                }
            }