Register frame callbacks for sync right before draw

The drawListener is invoked in VRI right before calling into native
draw, but after the frame callback is registered to handle sync. This
can cause issues if something is trying to ensure a sync via the
drawListener callback. Instead, set up the frame callback and sync right
before calling draw so all sync requests are picked up in that frame

Test: SurfaceSyncGroupContinuousTest
Test: SurfaceSyncGroupTests
Test: AttachedSurfaceControlSyncTest
Bug: 287729934
Change-Id: I6cd583d66457729ecc0b229a1e486db5dca69b3f
1 file changed