[PiP2] Do not stop PiP-ing activity
Say we have two transitions T1, T2. T1 is sending a potential PiP candidate TO_BACK and hence once the visibility of that activity is commited on finish, it will try and stop the pip activity. Now say T2 is trying to put that activity into a pinned task. But in PiP2, Shell is to decide whether to call WCT#movePipActivityToPinnedRootTask(), which is supposed to remove pip activity from ATS#mStoppingActivities. The issue is that if T2 is "requested" first via requestStartTransition into Shell, the Core is idle to start processing stopping activities, and we might stop a potential PiP-ing activity briefly. Solution: make sure to explicitly collect the PiP activity as we are requesting TRANSIT_PIP and starting the collection process. This way ATS#processStoppingAndFinishingActivities() will actually skip stopping it, as it deems it an "animating" activity. Bug: 390675659 Flag: com.android.wm.shell.enable_pip2 Test: manually tap elsewhere in overview to enter PiP Test: legacy-enter PiP in gesture nav mode Change-Id: I21bb6b118dbe2a3c76199739de8a09a1f86c74c8
Loading
Please register or sign in to comment