diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
index 58cb558..9bc8cdd 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
@@ -642,7 +642,7 @@
         long resetDuration = mControllers.taskbarStashController.isInApp()
                 ? duration
                 : duration / 2;
-        if (mControllers.taskbarTranslationController.shouldResetBackToZero(resetDuration)
+        if (!mControllers.taskbarTranslationController.willAnimateToZeroBefore(resetDuration)
                 && (isAnimatingToLauncher() || mLauncherState == LauncherState.NORMAL)) {
             animatorSet.play(mControllers.taskbarTranslationController
                     .createAnimToResetTranslation(resetDuration));
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarTranslationController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarTranslationController.java
index 4b18bb6..065d111 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarTranslationController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarTranslationController.java
@@ -54,7 +54,6 @@
     private boolean mHasSprungOnceThisGesture;
     private @Nullable ValueAnimator mSpringBounce;
     private boolean mGestureEnded;
-    private boolean mGestureInProgress;
     private boolean mAnimationToHomeRunning;
 
     private final boolean mIsTransientTaskbar;
@@ -124,7 +123,6 @@
 
     private void reset() {
         mGestureEnded = false;
-        mGestureInProgress = false;
         mHasSprungOnceThisGesture = false;
     }
 
@@ -136,24 +134,18 @@
     }
 
     /**
-     * Returns {@code true} if we should reset the animation back to zero.
-     *
-     * Returns {@code false} if there is a gesture in progress, or if we are already animating
-     * to 0 within the specified duration.
+     * Returns true if we will animate to zero before the input duration.
      */
-    public boolean shouldResetBackToZero(long duration) {
-        if (mGestureInProgress) {
-            return false;
-        }
+    public boolean willAnimateToZeroBefore(long duration) {
         if (mSpringBounce != null && mSpringBounce.isRunning()) {
             long springDuration = mSpringBounce.getDuration();
             long current = mSpringBounce.getCurrentPlayTime();
-            return (springDuration - current >= duration);
+            return (springDuration - current < duration);
         }
         if (mTranslationYForSwipe.isAnimatingToValue(0)) {
-            return mTranslationYForSwipe.getRemainingTime() >= duration;
+            return mTranslationYForSwipe.getRemainingTime() < duration;
         }
-        return true;
+        return false;
     }
 
     /**
@@ -196,7 +188,6 @@
             mAnimationToHomeRunning = false;
             cancelSpringIfExists();
             reset();
-            mGestureInProgress = true;
         }
         /**
          * Called when there is movement to move the taskbar.
@@ -220,7 +211,6 @@
                 mGestureEnded = true;
                 startSpring();
             }
-            mGestureInProgress = false;
         }
     }
 
@@ -232,7 +222,6 @@
         pw.println(prefix + "\tmHasSprungOnceThisGesture=" + mHasSprungOnceThisGesture);
         pw.println(prefix + "\tmAnimationToHomeRunning=" + mAnimationToHomeRunning);
         pw.println(prefix + "\tmGestureEnded=" + mGestureEnded);
-        pw.println(prefix + "\tmGestureInProgress=" + mGestureInProgress);
         pw.println(prefix + "\tmSpringBounce is running=" + (mSpringBounce != null
                 && mSpringBounce.isRunning()));
     }
