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

Commit e3a96809 authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Cleanup swipe detector in case of double cancel" into ub-launcher3-edmonton

parents 578890ad fa6cbbe1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -206,6 +206,10 @@ public abstract class AnimatorPlaybackController implements ValueAnimator.Animat
        mOnCancelRunnable = runnable;
    }

    public Runnable getOnCancelRunnable() {
        return mOnCancelRunnable;
    }

    public static class AnimatorPlaybackControllerVL extends AnimatorPlaybackController {

        private final ValueAnimator[] mChildAnimations;
+5 −0
Original line number Diff line number Diff line
@@ -244,8 +244,13 @@ public abstract class AbstractStateChangeTouchController
                        endProgress - Math.max(progress, 0));
            }
        } else {
            // Let the state manager know that the animation didn't go to the target state,
            // but don't cancel ourselves (we already clean up when the animation completes).
            Runnable onCancel = mCurrentAnimation.getOnCancelRunnable();
            mCurrentAnimation.setOnCancelRunnable(null);
            mCurrentAnimation.dispatchOnCancel();
            mCurrentAnimation.setOnCancelRunnable(onCancel);

            endProgress = 0;
            if (progress <= 0) {
                duration = 0;