Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75b4b9d8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Annotating open-app transitions in trace files" into ub-launcher3-master

parents 681e6517 f367ced9
Loading
Loading
Loading
Loading
+25 −1
Original line number Original line Diff line number Diff line
@@ -904,6 +904,9 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
     */
     */
    private class AppLaunchAnimationRunner implements WrappedAnimationRunnerImpl {
    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 Handler mHandler;
        private final View mV;
        private final View mV;


@@ -926,7 +929,8 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
            boolean launcherClosing =
            boolean launcherClosing =
                    launcherIsATargetWithMode(appTargets, MODE_CLOSING);
                    launcherIsATargetWithMode(appTargets, MODE_CLOSING);


            if (isLaunchingFromRecents(mV, appTargets)) {
            final boolean launchingFromRecents = isLaunchingFromRecents(mV, appTargets);
            if (launchingFromRecents) {
                composeRecentsLaunchAnimator(anim, mV, appTargets, wallpaperTargets,
                composeRecentsLaunchAnimator(anim, mV, appTargets, wallpaperTargets,
                        launcherClosing);
                        launcherClosing);
            } else {
            } else {
@@ -934,6 +938,26 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
                        launcherClosing);
                        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) {
            if (launcherClosing) {
                anim.addListener(mForceInvisibleListener);
                anim.addListener(mForceInvisibleListener);
            }
            }