Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d222a68 authored by Adam Powell's avatar Adam Powell Committed by android-build-merger
Browse files

Merge "Merge "Fix for unexpected scale factors in ScaleGestureDetector" into...

Merge "Merge "Fix for unexpected scale factors in ScaleGestureDetector" into qt-dev am: 47289344" into qt-dev-plus-aosp
am: 52d8fd98

Change-Id: Ie57f74c1b24aa59798e2bc1239924661fb138d1f
parents 64562c10 52d8fd98
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -551,7 +551,7 @@ public class ScaleGestureDetector {
                    (mEventBeforeOrAboveStartingGestureEvent && (mCurrSpan < mPrevSpan)) ||
                    (!mEventBeforeOrAboveStartingGestureEvent && (mCurrSpan > mPrevSpan));
            final float spanDiff = (Math.abs(1 - (mCurrSpan / mPrevSpan)) * SCALE_FACTOR);
            return mPrevSpan <= 0 ? 1 : scaleUp ? (1 + spanDiff) : (1 - spanDiff);
            return mPrevSpan <= mSpanSlop ? 1 : scaleUp ? (1 + spanDiff) : (1 - spanDiff);
        }
        return mPrevSpan > 0 ? mCurrSpan / mPrevSpan : 1;
    }