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

Commit 2c56d353 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Optimize TextView#onDraw() a bit" into main

parents 86da59b4 0b48cef7
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -2098,19 +2098,16 @@ public class Editor {
        final int selectionEnd = mTextView.getSelectionEnd();

        final InputMethodState ims = mInputMethodState;
        if (ims != null && ims.mBatchEditNesting == 0) {
        if (ims != null && ims.mBatchEditNesting == 0
                && (ims.mContentChanged || ims.mSelectionModeChanged)) {
            InputMethodManager imm = getInputMethodManager();
            if (imm != null) {
                if (imm.hasActiveInputConnection(mTextView)) {
                    if (ims.mContentChanged || ims.mSelectionModeChanged) {
            if (imm != null && imm.hasActiveInputConnection(mTextView)) {
                // We are in extract mode and the content has changed
                // in some way... just report complete new text to the
                // input method.
                reportExtractedText();
            }
        }
            }
        }

        if (mCorrectionHighlighter != null) {
            mCorrectionHighlighter.draw(canvas, cursorOffsetVertical);