Request legacy app transition when moveActivityToFront

Before, when there is no ActivityEmbedding, the transition is requested
later when the previous top Activity is paused to resume the Task top,
which works ok. But when there is ActivityEmbedding, the organizer may
request WCT that trigger visibility update before a transition is
requested, which cause a flicker.

When startActivity with FLAG_ACTIVITY_REORDER_TO_FRONT to bring an
existing activity to the front, we should call prepareAppTransition
early to make sure the following activity visibility change is tracked.

Fix: 255701223
Test: verify with FLAG_ACTIVITY_REORDER_TO_FRONT app
Change-Id: I65d4ffd1c17d6817c073122447e620a2fbb514a1
2 files changed