Merge "Can't stop the fling! Bug: 5335420" into ics-factoryrom
This commit is contained in:
@ -3654,7 +3654,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
|||||||
vt.computeCurrentVelocity(1000, mMaximumVelocity);
|
vt.computeCurrentVelocity(1000, mMaximumVelocity);
|
||||||
final float yvel = -vt.getYVelocity(activeId);
|
final float yvel = -vt.getYVelocity(activeId);
|
||||||
|
|
||||||
if (scroller.isScrollingInDirection(0, yvel)) {
|
if (Math.abs(yvel) >= mMinimumVelocity
|
||||||
|
&& scroller.isScrollingInDirection(0, yvel)) {
|
||||||
// Keep the fling alive a little longer
|
// Keep the fling alive a little longer
|
||||||
postDelayed(this, FLYWHEEL_TIMEOUT);
|
postDelayed(this, FLYWHEEL_TIMEOUT);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1020,6 +1020,8 @@ bool VelocityTracker::getVelocity(uint32_t id, float* outVx, float* outVy) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*outVx = 0;
|
||||||
|
*outVy = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user