Skip to content

Commit a55191f

Browse files
committed
DO NOT MERGE Fix a bug that could cause flings to last too long using a Scroller
Change-Id: Ia176cdb029201dbad193d2d213d3cf6e16fbee63
1 parent 982f152 commit a55191f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/java/android/widget/Scroller.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ public boolean computeScrollOffset() {
218218
// Pin to mMinY <= mCurrY <= mMaxY
219219
mCurrY = Math.min(mCurrY, mMaxY);
220220
mCurrY = Math.max(mCurrY, mMinY);
221-
221+
222+
if (mCurrX == mFinalX && mCurrY == mFinalY) {
223+
mFinished = true;
224+
}
225+
222226
break;
223227
}
224228
}

0 commit comments

Comments
 (0)