Support tracking latency of shell recents transition

Note that now the metric counts the transition delay because it is
the actual duration to start animation. While in legacy, the
event of transition start is notified immediately when calling
startRecentsActivity, so it counts the draw time as the duration.
The different duration sources are because of different concept of
the animation system, however, the duration is still consistent with
actual visual result.

Also move reportStartReasonsToLogger to the end of onTransactionReady
to align the ready timing with legacy handleAppTransitionReady, which
should be closer to where the animation is prepared.

Bug: 218847872
Test: adb shell setprop persist.debug.shell_transit 1; reboot
      Launch any app and swipe from bottom. The logcat should
      contain "LatencyTracker: ACTION_TOGGLE_RECENTS".

Change-Id: Ib731e9d7a5f412577891fd887bbeb0a142c0117c
2 files changed