diff --git a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java index 9efa656b3ed34..60e6083790dc3 100644 --- a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java +++ b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java @@ -474,8 +474,6 @@ public class SwipeHelper implements Gefingerpoken { if (anim == null) { return; } - int duration = SNAP_ANIM_LEN; - anim.setDuration(duration); anim.addListener(new AnimatorListenerAdapter() { boolean wasCancelled = false; @@ -495,6 +493,9 @@ public class SwipeHelper implements Gefingerpoken { }); prepareSnapBackAnimation(animView, anim); mSnappingChild = true; + float maxDistance = Math.abs(targetLeft - getTranslation(animView)); + mFlingAnimationUtils.apply(anim, getTranslation(animView), targetLeft, velocity, + maxDistance); anim.start(); }