Fix issue with 0 duration animations
If the animation length was 0, it was possible that the finish
runnable is run before applying the pending transaction to
reparent the surface onto the leash. In that case, the reparent
to the leash will be executed after, taking precedence. Then,
the leash gets destroyed, and we loose the surface, leading
to all kinds of crashes.
Test: Disable animation duration scale, open a couple of apps,
observe no crash.
Test: go/wm-smoke
Change-Id: I04db7b7c1c3295779b8afead97d7850f808f9081
Fixes: 71499373
5 files changed