Wait for attachment in Activity syncEngine

There is a race between starting-window finishDraw and app
attachment on cold-start. If the starting-window finishes first,
the transition won't know if there is an associated display
rotation. This results in the launch transition playing early
but into the wrong rotation. Once the app does attach, a new
transition will be created for the display rotation yielding
an ugly animation.

Solve this by just waiting for attachment before reporting
syncFinished (after checking visibleRequested).

Bug: 202201326
Test: cold-launch activity into a different rotation many times
      and observe 1 transition instead of 2.
Change-Id: I744e8d35b4a11200be2374ca923ed9606e619977
1 file changed