diff --git a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java index e2449a4d8a..dddcc865fa 100644 --- a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java +++ b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java @@ -904,6 +904,9 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans */ private class AppLaunchAnimationRunner implements WrappedAnimationRunnerImpl { + private static final String TRANSITION_LAUNCH_FROM_RECENTS = "transition:LaunchFromRecents"; + private static final String TRANSITION_LAUNCH_FROM_ICON = "transition:LaunchFromIcon"; + private final Handler mHandler; private final View mV; @@ -926,7 +929,8 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans boolean launcherClosing = launcherIsATargetWithMode(appTargets, MODE_CLOSING); - if (isLaunchingFromRecents(mV, appTargets)) { + final boolean launchingFromRecents = isLaunchingFromRecents(mV, appTargets); + if (launchingFromRecents) { composeRecentsLaunchAnimator(anim, mV, appTargets, wallpaperTargets, launcherClosing); } else { @@ -934,6 +938,26 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans launcherClosing); } + if (Trace.isEnabled()) { + final String section = + launchingFromRecents + ? TRANSITION_LAUNCH_FROM_RECENTS : TRANSITION_LAUNCH_FROM_ICON; + + anim.addListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationStart(Animator animation) { + Trace.beginAsyncSection(section, 0); + super.onAnimationStart(animation); + } + + @Override + public void onAnimationEnd(Animator animation) { + super.onAnimationEnd(animation); + Trace.endAsyncSection(section, 0); + } + }); + } + if (launcherClosing) { anim.addListener(mForceInvisibleListener); }