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

Commit 660a872c authored by Shu Chen's avatar Shu Chen Committed by Android (Google) Code Review
Browse files

Merge "Ensures the slop value is fixed cross lines." into rvc-qpr-dev

parents 909d7c6c 0cb53bb6
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -6059,12 +6059,7 @@ public class Editor {
            return trueLine;
        }

        final int lineHeight = layout.getLineBottom(prevLine) - layout.getLineTop(prevLine);
        int slop = (int)(LINE_SLOP_MULTIPLIER_FOR_HANDLEVIEWS
                * (layout.getLineBottom(trueLine) - layout.getLineTop(trueLine)));
        slop = Math.max(mLineChangeSlopMin,
                Math.min(mLineChangeSlopMax, lineHeight + slop)) - lineHeight;
        slop = Math.max(0, slop);
        final int slop = (int)(LINE_SLOP_MULTIPLIER_FOR_HANDLEVIEWS * mTextView.getLineHeight());

        final float verticalOffset = mTextView.viewportToContentVerticalOffset();
        if (trueLine > prevLine && y >= layout.getLineBottom(prevLine) + slop + verticalOffset) {