am c3213285: am 072097bd: am 8cc00243: Merge "Keep OverScroller.SplineOverScroller state consistent." into mnc-dev
* commit 'c32132853f9eaf62ec59fa375a288b957c50e53a':
Keep OverScroller.SplineOverScroller state consistent.
diff --git a/core/java/android/widget/OverScroller.java b/core/java/android/widget/OverScroller.java
index 98bfd7d..50569d7 100644
--- a/core/java/android/widget/OverScroller.java
+++ b/core/java/android/widget/OverScroller.java
@@ -678,7 +678,7 @@
void startScroll(int start, int distance, int duration) {
mFinished = false;
- mStart = start;
+ mCurrentPosition = mStart = start;
mFinal = start + distance;
mStartTime = AnimationUtils.currentAnimationTimeMillis();
@@ -712,7 +712,7 @@
boolean springback(int start, int min, int max) {
mFinished = true;
- mStart = mFinal = start;
+ mCurrentPosition = mStart = mFinal = start;
mVelocity = 0;
mStartTime = AnimationUtils.currentAnimationTimeMillis();
@@ -804,7 +804,7 @@
final float totalDuration = (float) Math.sqrt(
2.0 * (distanceToApex + distanceToEdge) / Math.abs(mDeceleration));
mStartTime -= (int) (1000.0f * (totalDuration - durationToApex));
- mStart = end;
+ mCurrentPosition = mStart = end;
mVelocity = (int) (- mDeceleration * totalDuration);
}
@@ -873,7 +873,7 @@
// Duration from start to null velocity
if (mDuration < mSplineDuration) {
// If the animation was clamped, we reached the edge
- mStart = mFinal;
+ mCurrentPosition = mStart = mFinal;
// TODO Better compute speed when edge was reached
mVelocity = (int) mCurrVelocity;
mDeceleration = getDeceleration(mVelocity);