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

Commit 66563b44 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Copy pip surface for the usages outside transition

The surfaces in transition should be released once the transition
is finished. If the transition handler needs to perform some
actions to the surface outside the transition, it needs to make
a copy and manage when to release.

For pip1, the accesses outside transition use the surface from
PipTaskOrganizer#getSurfaceControl (not the leash from transition),
so only pip menu needs a copy for the case that uses the surface
from menu's surfaceCreated.

For pip2, all accesses use PipTransitionState#getPinnedTaskLeash.
So make a copy when receiving ENTERING_PIP and release the surface
when receiving EXITED_PIP.

Bug: 429548260
Flag: com.android.window.flags.release_all_transition_surfaces
Test: atest PinnedStackTests
Change-Id: I4889d168b99f370dfc865a00efe351ba89a1ec99
parent 5d23bdf5
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