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
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user