Loading core/java/android/inputmethodservice/InputMethodService.java +0 −5 Original line number Diff line number Diff line Loading @@ -2988,11 +2988,6 @@ public class InputMethodService extends AbstractInputMethodService { * extracted text updates, although if so it will not receive this call * if the extracted text has changed as well. * * <p>Be careful about changing the text in reaction to this call with * methods such as setComposingText, commitText or * deleteSurroundingText. If the cursor moves as a result, this method * will be called again, which may result in an infinite loop. * * <p>The default implementation takes care of updating the cursor in * the extract text, if it is being shown. */ Loading core/java/android/view/inputmethod/InputMethodManager.java +4 −9 Original line number Diff line number Diff line Loading @@ -2675,19 +2675,14 @@ public final class InputMethodManager { if (DEBUG) { Log.v(TAG, "SELECTION CHANGE: " + mCurrentInputMethodSession); } final int oldSelStart = mCursorSelStart; final int oldSelEnd = mCursorSelEnd; // Update internal values before sending updateSelection to the IME, because // if it changes the text within its onUpdateSelection handler in a way that // does not move the cursor we don't want to call it again with the same values. mCurrentInputMethodSession.updateSelection(mCursorSelStart, mCursorSelEnd, selStart, selEnd, candidatesStart, candidatesEnd); forAccessibilitySessionsLocked(wrapper -> wrapper.updateSelection(mCursorSelStart, mCursorSelEnd, selStart, selEnd, candidatesStart, candidatesEnd)); mCursorSelStart = selStart; mCursorSelEnd = selEnd; mCursorCandStart = candidatesStart; mCursorCandEnd = candidatesEnd; mCurrentInputMethodSession.updateSelection( oldSelStart, oldSelEnd, selStart, selEnd, candidatesStart, candidatesEnd); forAccessibilitySessionsLocked(wrapper -> wrapper.updateSelection(oldSelStart, oldSelEnd, selStart, selEnd, candidatesStart, candidatesEnd)); } } } Loading Loading
core/java/android/inputmethodservice/InputMethodService.java +0 −5 Original line number Diff line number Diff line Loading @@ -2988,11 +2988,6 @@ public class InputMethodService extends AbstractInputMethodService { * extracted text updates, although if so it will not receive this call * if the extracted text has changed as well. * * <p>Be careful about changing the text in reaction to this call with * methods such as setComposingText, commitText or * deleteSurroundingText. If the cursor moves as a result, this method * will be called again, which may result in an infinite loop. * * <p>The default implementation takes care of updating the cursor in * the extract text, if it is being shown. */ Loading
core/java/android/view/inputmethod/InputMethodManager.java +4 −9 Original line number Diff line number Diff line Loading @@ -2675,19 +2675,14 @@ public final class InputMethodManager { if (DEBUG) { Log.v(TAG, "SELECTION CHANGE: " + mCurrentInputMethodSession); } final int oldSelStart = mCursorSelStart; final int oldSelEnd = mCursorSelEnd; // Update internal values before sending updateSelection to the IME, because // if it changes the text within its onUpdateSelection handler in a way that // does not move the cursor we don't want to call it again with the same values. mCurrentInputMethodSession.updateSelection(mCursorSelStart, mCursorSelEnd, selStart, selEnd, candidatesStart, candidatesEnd); forAccessibilitySessionsLocked(wrapper -> wrapper.updateSelection(mCursorSelStart, mCursorSelEnd, selStart, selEnd, candidatesStart, candidatesEnd)); mCursorSelStart = selStart; mCursorSelEnd = selEnd; mCursorCandStart = candidatesStart; mCursorCandEnd = candidatesEnd; mCurrentInputMethodSession.updateSelection( oldSelStart, oldSelEnd, selStart, selEnd, candidatesStart, candidatesEnd); forAccessibilitySessionsLocked(wrapper -> wrapper.updateSelection(oldSelStart, oldSelEnd, selStart, selEnd, candidatesStart, candidatesEnd)); } } } Loading