Detect Remove-pip transaction to properly close multi-activity pips
Multi-activity pip converts setWindowingMode(UNDEFINED) into a "reparent pip activity + move-to-front" when expanding pip. Shell doesn't know whether a pip is multi-activity or not, so it just makes a WCT with setWindowingMode(UNDEFINED) AND reorder-to-back. The problem is that setWindowingMode happens first which triggers the "merge + move-to-front" logic -- the reorder command was for the unmerged task so it just gets ignored. This CL basically checks if the WCT also has a move-to-back in addition to setMode(UNDEFINED) and, if so, uses the "workaround" found in removePinnedRootTaskInSurfaceTransaction to prevent setWindowingMode(UNDEFINED) from doing the wrong thing: it sets FORCE_HIDDEN_FOR_PINNED_TASK. Bug: 232954259 Test: open multi-activity pip (eg. ApiDemos). Go to pip. close it via the X button. Change-Id: Iaafbc1c930eb1bcfb427533ae28ef9a823d6b9c6
Loading
Please register or sign in to comment