Fix a bug where window animation could be janky

SurfaceControl.closeTransaction() will block until the transaction
takes effect and this happens at the next vsync -- in practice
it means this call blocks for ~15ms.

Immediately after that we ask the choreographer to schedule the
next frame, which will happen at the next vsync. depending the
timing, this would cause the window manager to animate at 30 fps
instead of 60.

This is fixed here by calling the choreographer before we
call closeTransaction().

In the near future, we should be able to fix this by using
an offseted vsync for the window manager and it won't need
closeTransaction() to block at all.

Bug: 10209014
Change-Id: I33d0c5ecfc25154b2859f3023a8cda6e641826bf
1 file changed