Destroy dim layer in transaction.
Currently the destroy is done outside a transaction, causing the layer
to get destroyed while the animation is still holding a reference to it.
Instead, call destroy in the transaction to ensure the destroy executes
with the other transaction requests that occur at the end of the
animation.
Specifically, the reparent was occurring after the destroy completed,
causing the surface to get reparented and remain around forever.
Change-Id: I72c2a6f2a67673fdc2047d78b02a299f64fc44a0
Fixes: 117401895
Test: Repro steps from bug
Test: DimmerTests
2 files changed