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
Loading
Please register or sign in to comment