Backed out changeset 71445b7c3044 (bug 1292034) for GTest failing APZScrollHandoffTester.ScrollgrabFlingAcceleration1. r=backout

This commit is contained in:
Sebastian Hengst 2016-10-08 00:43:03 +02:00
Родитель 9b22c798f5
Коммит 44dd1f666b
1 изменённых файлов: 2 добавлений и 7 удалений

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

@ -261,14 +261,9 @@ public class StackScroller {
if (mFlywheel && !isFinished()) {
float oldVelocityX = mScrollerX.mCurrVelocity;
float oldVelocityY = mScrollerY.mCurrVelocity;
boolean sameXDirection = (velocityX == 0) || (oldVelocityX == 0) ||
((velocityX < 0) == (oldVelocityX < 0));
boolean sameYDirection = (velocityY == 0) || (oldVelocityY == 0) ||
((velocityY < 0) == (oldVelocityY < 0));
if (sameXDirection) {
if (Math.signum(velocityX) == Math.signum(oldVelocityX)
&& Math.signum(velocityY) == Math.signum(oldVelocityY)) {
velocityX += oldVelocityX;
}
if (sameYDirection) {
velocityY += oldVelocityY;
}
}