Merge changes from topic "am-783afe5f-3535-4bbb-b942-8ecc2e7bd96a" into ub-launcher3-master

* changes:
  [automerger] Cleanup swipe detector in case of double cancel am: fa6cbbe15b
  Cleanup swipe detector in case of double cancel
This commit is contained in:
Tony Wickham authored and Android (Google) Code Review committed 2018-05-09 16:00:02 +00:00
commit 2affad887f
2 files changed
+9

No files matched your search

@@ -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;
@@ -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;