Merge "Don't enter overscroll when dragging fast scrollbar." into ub-launcher3-dorval-polish

am: 35005ef213

Change-Id: Ia48ce4ac048e9d40dab594428fd00b86e0782a2b
This commit is contained in:
Tony Wickham 2017-07-05 17:57:50 +00:00 committed by android-build-merger
commit 4d59e4a520
1 changed files with 2 additions and 1 deletions

View File

@ -495,7 +495,8 @@ public class AllAppsRecyclerView extends BaseRecyclerView {
public boolean onDrag(float displacement, float velocity) { public boolean onDrag(float displacement, float velocity) {
// We are in overscroll iff we are trying to drag further down when we're already at // We are in overscroll iff we are trying to drag further down when we're already at
// the bottom of All Apps. // the bottom of All Apps.
mIsInOverScroll = !canScrollVertically(1) && displacement < 0; mIsInOverScroll = !canScrollVertically(1) && displacement < 0
&& !mScrollbar.isDraggingThumb();
if (mIsInOverScroll) { if (mIsInOverScroll) {
displacement = getDampedOverScroll(displacement); displacement = getDampedOverScroll(displacement);