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

Commit 085455fd authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix: EditText returns wrong CursorAnchorInfo matrix"

parents beb407a3 85dfb5e3
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -4583,7 +4583,6 @@ public class Editor {
     */
    private final class CursorAnchorInfoNotifier implements TextViewPositionListener {
        final CursorAnchorInfo.Builder mSelectionInfoBuilder = new CursorAnchorInfo.Builder();
        final int[] mTmpIntOffset = new int[2];
        final Matrix mViewToScreenMatrix = new Matrix();

        @Override
@@ -4635,9 +4634,8 @@ public class Editor {
            builder.setSelectionRange(selectionStart, mTextView.getSelectionEnd());

            // Construct transformation matrix from view local coordinates to screen coordinates.
            mViewToScreenMatrix.set(mTextView.getMatrix());
            mTextView.getLocationOnScreen(mTmpIntOffset);
            mViewToScreenMatrix.postTranslate(mTmpIntOffset[0], mTmpIntOffset[1]);
            mViewToScreenMatrix.reset();
            mTextView.transformMatrixToGlobal(mViewToScreenMatrix);
            builder.setMatrix(mViewToScreenMatrix);

            if (includeEditorBounds) {