Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 09349771 authored by Eric Lin's avatar Eric Lin Committed by Android Build Coastguard Worker
Browse files

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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:81441aa50f45c333941baaea31da2019374f223c)
Merged-In: I8ed5938f122988383b11fe0820723de980313540
Change-Id: I8ed5938f122988383b11fe0820723de980313540
parent 6453ac40
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment