Bug 700559 - Fix crash with overlapping fling events [r=pcwalton]

A crash occurs when a second fling is started while the
first fling has a non-zero velocity but zero excess. This
happens because the displacement could temporarily trigger
an overscroll, but then since the new viewport is not saved,
it reverts back to no overscroll. However, state variables
have already been updated, leading to things being out of
sync and triggering the crash. Adding a call to update
the position fixes this. See bug for more details.
This commit is contained in:
Kartikaya Gupta 2011-11-17 13:25:56 -05:00
Родитель 56dda18be1
Коммит 35dfb2181b
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -250,6 +250,7 @@ public class PanZoomController
mX.velocity = mY.velocity = 0.0f;
mX.displace(); mY.displace();
updatePosition();
if (mFlingTimer != null)
mFlingTimer.cancel();