Mark pinned activity task as auto-removeable from recents.
Tasks resumed from Picture-in-Picture (PIP) mode originating from a non-single activity task were unintentionally added to the recents. We initially observed this issue on the 24D1-dev branch when exiting PIP (b/323315206), which was fixed by ag/26565884 on the main branch. However, we encountered another scenario when exiting PIP that originated from a non-single activity task with split pair. It involves reorder operations (`mHierarchyOps`) to split paired in recents. The pinned activity task was being added to the recents while resuming the top PIP activity. This change takes a different approach compared to previous attempt. Instead of checking if the task is a pinned activity task from a non-single activity task for each `RecentTasks.add`, this change only marks the pinned activity task as auto-removable and then lets `reparent` in `Task.setWindowingMode` cleanup resources for destory. This approach prevents empty pinned task from appearing in recents. Test: atest WmTests:TaskTests WmTests:RootWindowContainerTests Fix: 348085976 Flag: EXEMPT bugfix Change-Id: I8ed5938f122988383b11fe0820723de980313540
Loading
Please register or sign in to comment