From 2e3bcea6d92336b21b33222ccbfa4799e63386dc Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Mon, 1 Apr 2019 15:09:48 +0200 Subject: [PATCH] Also log when mayWait=false Iebef462f244ef2457a2e7c9ad0a706aebe291fe8 started to use a different code path, which would call startActivity instead of startActivityMayWait. Turns out that we never had logging triggered in startActivity, so we add logging such that this case also outputs logging Test: PerfTransitionTest Fixes: 129673255 Change-Id: If918db940085666ccd36dc0a62d1a863d2fbc8a9 --- .../core/java/com/android/server/wm/ActivityStarter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java index 20586dbe5ecea..7c12c1ebc2be7 100644 --- a/services/core/java/com/android/server/wm/ActivityStarter.java +++ b/services/core/java/com/android/server/wm/ActivityStarter.java @@ -608,6 +608,7 @@ class ActivityStarter { boolean ignoreTargetSecurity, boolean componentSpecified, ActivityRecord[] outActivity, TaskRecord inTask, boolean allowPendingRemoteAnimationRegistryLookup, PendingIntentRecord originatingPendingIntent, boolean allowBackgroundActivityStart) { + mSupervisor.getActivityMetricsLogger().notifyActivityLaunching(intent); int err = ActivityManager.START_SUCCESS; // Pull the optional Ephemeral Installer-only bundle out of the options early. final Bundle verificationBundle @@ -928,8 +929,10 @@ class ActivityStarter { mService.onStartActivitySetDidAppSwitch(); mController.doPendingActivityLaunches(false); - return startActivity(r, sourceRecord, voiceSession, voiceInteractor, startFlags, + final int res = startActivity(r, sourceRecord, voiceSession, voiceInteractor, startFlags, true /* doResume */, checkedOptions, inTask, outActivity); + mSupervisor.getActivityMetricsLogger().notifyActivityLaunched(res, outActivity[0]); + return res; } private boolean shouldAbortBackgroundActivityStart(int callingUid, int callingPid,