Flush mPostDrawTransaction when WSA is torn down
When ViewRootImpl gets a sync request from WM, it will wait until it
gets a transaction complete callback before continuing. This means WM
must apply the transaction that contains the buffer. In this case, the
finishDraw was racing the WSA getting marked as hidden. When WSA is
hidden, we don't apply the transaction right away in case we want to
synchronize with some initial properties. So for this case, the buffer
was never getting submitted.
Instead, apply mPostDrawTransaction when the WSA SurfaceControl is
getting destroyed to ensure we don't leave any pending transactions when
getitng torn down.
Test: Pip, rotate to landscape, dismiss, re-open app in portrait
Fixes: 191151909
Change-Id: I00606c0ed250a10e1651c403665f39be52e9a89e
1 file changed