Request transition when PIP is removed
This CL is a reland of the following change with a fix for CTS: I4c13ecc1b3c1dff15bd0d61aeafeacc1d7705460 Original commit message from here When PIP gets killed via removeRootTasksWithActivityTypes(), no transition is requested. For non-PIP tasks, processRemoveTask() is called to remove the task, in which requestCloseTransitionIfNeeded() is invoked. But in the case of PIP, removePinnedRootTaskInSurfaceTransaction() is called but we seem to miss requesting a close transition. Original commit message to here The original change broke a CTS test, which expects onStop() is called before onPictureInPictureModeChanged() when PiP is removed. This is because scheduling a transition at the beginning of removePinnedRootTaskInSurfaceTransaction() prevents the workaround of forcefully stopping the PiP activity in the same function from working. The reason why the workaround doesn't work is, in processStoppingAndFinishingActivities(), there's a check whether a stopping activity is in a transition, and if it is, stopping it is deferred. However, we need to start a transition before we forcefully make the activity invisible and stopped to properly collect it, so this CL gives an exception to forcefully hidden PiP so that it will be stoppped immediately even if it's in a transition. Bug: 277864359 Bug: 275021556 Bug: 273141544 Bug: 272637936 Test: PinnedStackTests Change-Id: Iec89dcdd0081eca1f26161aaead1662f0f661ab6
Loading
Please register or sign in to comment