diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java index 67ebc02a74..b89032e704 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java @@ -117,6 +117,24 @@ public class TaskbarDragController extends DragController extends Fram private boolean mHasDrawn = false; final ValueAnimator mAnim; + // Whether mAnim has started. Unlike mAnim.isStarted(), this is true even after mAnim ends. + private boolean mAnimStarted; private int mLastTouchX; private int mLastTouchY; @@ -171,6 +175,12 @@ public abstract class DragView extends Fram animation.cancel(); } }); + mAnim.addListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationStart(Animator animation) { + mAnimStarted = true; + } + }); setDragRegion(new Rect(0, 0, width, height)); @@ -396,6 +406,10 @@ public abstract class DragView extends Fram } } + public boolean isAnimationFinished() { + return mAnimStarted && !mAnim.isRunning(); + } + /** * Move the window containing this view. *