startop: Add timestamps for IntentStarted and ActivityLaunchFinished.
The timestamps are used to compute duration of TotalTime and ReportFullyDrawn.
TotalTime = t(ActivityLaunchFinished) - t(IntentStarted)
ReportFullyDrawn = t(ReportFullyDrawn) - t(IntentStarted)
where t(x) is the timestamp of x.
Bug: 137786390
Bug: 137784595
Test: Make
Test: atest CtsWindowManagerDeviceTestCases:ActivityMetricsLoggerTests
Change-Id: I75c0be8508499dce186fd392e79b67b2fefc8842
diff --git a/services/core/java/com/android/server/wm/AppTransitionController.java b/services/core/java/com/android/server/wm/AppTransitionController.java
index 20a871b..96b7ca3 100644
--- a/services/core/java/com/android/server/wm/AppTransitionController.java
+++ b/services/core/java/com/android/server/wm/AppTransitionController.java
@@ -212,7 +212,7 @@
mDisplayContent.computeImeTarget(true /* updateImeTarget */);
mService.mAtmInternal.notifyAppTransitionStarting(mTempTransitionReasons.clone(),
- SystemClock.uptimeMillis());
+ SystemClock.elapsedRealtimeNanos());
if (transit == TRANSIT_SHOW_SINGLE_TASK_DISPLAY) {
mService.mAnimator.addAfterPrepareSurfacesRunnable(() -> {