diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 08d523121e..17d1afc168 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -342,6 +342,8 @@ public abstract class RecentsView mSizeStrategy; protected RecentsAnimationController mRecentsAnimationController; @@ -975,6 +977,12 @@ public abstract class RecentsView extends ViewGrou mAllowOverScroll = enable; } + protected float getSignificantMoveThreshold() { + return SIGNIFICANT_MOVE_THRESHOLD; + } + @Override public boolean onTouchEvent(MotionEvent ev) { // Skip touch handling if there are no pages to swipe @@ -1218,6 +1222,7 @@ public abstract class PagedView extends ViewGrou } delta -= consumed; } + delta /= mOrientationHandler.getPrimaryScale(this); // Only scroll and update mLastMotionX if we have moved some discrete amount. We // keep the remainder because we are actually testing if we've moved from the last @@ -1270,11 +1275,12 @@ public abstract class PagedView extends ViewGrou int velocity = (int) mOrientationHandler.getPrimaryVelocity(velocityTracker, mActivePointerId); - int delta = (int) (primaryDirection - mDownMotionPrimary); + float delta = primaryDirection - mDownMotionPrimary; + delta /= mOrientationHandler.getPrimaryScale(this); int pageOrientedSize = mOrientationHandler.getMeasuredSize(getPageAt(mCurrentPage)); - boolean isSignificantMove = Math.abs(delta) > pageOrientedSize * - SIGNIFICANT_MOVE_THRESHOLD; + boolean isSignificantMove = Math.abs(delta) + > pageOrientedSize * getSignificantMoveThreshold(); mTotalMotion += Math.abs(mLastMotion + mLastMotionRemainder - primaryDirection); boolean passedSlop = mAllowEasyFling || mTotalMotion > mPageSlop;