Loading quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +18 −6 Original line number Diff line number Diff line Loading @@ -1644,7 +1644,15 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener } private void addCujInstrumentation(Animator anim, int cuj) { anim.addListener(new AnimationSuccessListener() { anim.addListener(getCujAnimationSuccessListener(cuj)); } private void addCujInstrumentation(RectFSpringAnim anim, int cuj) { anim.addAnimatorListener(getCujAnimationSuccessListener(cuj)); } private AnimationSuccessListener getCujAnimationSuccessListener(int cuj) { return new AnimationSuccessListener() { @Override public void onAnimationStart(Animator animation) { mDragLayer.getViewTreeObserver().addOnDrawListener( Loading Loading @@ -1678,7 +1686,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener public void onAnimationSuccess(Animator animator) { InteractionJankMonitorWrapper.end(cuj); } }); }; } /** Loading Loading @@ -1759,10 +1767,6 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener // invisibility on touch down, and only reset it after the animation to home // is initialized. if (launcherIsForceInvisibleOrOpening || fromPredictiveBack) { addCujInstrumentation(anim, playFallBackAnimation ? Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK : Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME); AnimatorListenerAdapter endListener = new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { Loading @@ -1772,6 +1776,14 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener } }; if (rectFSpringAnim != null && anim.getChildAnimations().isEmpty()) { addCujInstrumentation(rectFSpringAnim, Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME); } else { addCujInstrumentation(anim, playFallBackAnimation ? Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK : Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME); } if (fromPredictiveBack && rectFSpringAnim != null) { rectFSpringAnim.addAnimatorListener(endListener); } else { Loading Loading
quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +18 −6 Original line number Diff line number Diff line Loading @@ -1644,7 +1644,15 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener } private void addCujInstrumentation(Animator anim, int cuj) { anim.addListener(new AnimationSuccessListener() { anim.addListener(getCujAnimationSuccessListener(cuj)); } private void addCujInstrumentation(RectFSpringAnim anim, int cuj) { anim.addAnimatorListener(getCujAnimationSuccessListener(cuj)); } private AnimationSuccessListener getCujAnimationSuccessListener(int cuj) { return new AnimationSuccessListener() { @Override public void onAnimationStart(Animator animation) { mDragLayer.getViewTreeObserver().addOnDrawListener( Loading Loading @@ -1678,7 +1686,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener public void onAnimationSuccess(Animator animator) { InteractionJankMonitorWrapper.end(cuj); } }); }; } /** Loading Loading @@ -1759,10 +1767,6 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener // invisibility on touch down, and only reset it after the animation to home // is initialized. if (launcherIsForceInvisibleOrOpening || fromPredictiveBack) { addCujInstrumentation(anim, playFallBackAnimation ? Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK : Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME); AnimatorListenerAdapter endListener = new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { Loading @@ -1772,6 +1776,14 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener } }; if (rectFSpringAnim != null && anim.getChildAnimations().isEmpty()) { addCujInstrumentation(rectFSpringAnim, Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME); } else { addCujInstrumentation(anim, playFallBackAnimation ? Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK : Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME); } if (fromPredictiveBack && rectFSpringAnim != null) { rectFSpringAnim.addAnimatorListener(endListener); } else { Loading