Skip to content

Commit 9093717

Browse files
adampAndroid (Google) Code Review
authored andcommitted
Merge "DO NOT MERGE Fix a bug that could cause flings to last too long using a Scroller" into froyo
2 parents cdf1678 + a55191f commit 9093717

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)