Fix Display SurfaceControl leak
The DisplayContent was merging its transaction into the RootWindowContainer's pendingTransaction. However, that transaction is never applied so it was stuck in that transaction forever. There's no need to merge to parent transaction when removing since calling getPendingTransaction will already return the DisplayContent's transaction. Also added a forced Transaction.apply() when removing the DisplayContent since there's a chance it may no be reachable when performSurfacePlacement is called to apply all transactions. Test: EncodeVirtualDisplayWithCompositionTest#testVirtualDisplayRecycles No longer leaks SurfaceControls Fixes: 149526716 Change-Id: I14aa5b2e0e14d75fb0285a1b7a511235064f621c
Loading
Please register or sign in to comment