Loading core/java/android/widget/Editor.java +7 −11 Original line number Diff line number Diff line Loading @@ -286,6 +286,13 @@ public class Editor { mUndoManager.redo(owners, 1); // Redo 1 action. } void replace() { int middle = (mTextView.getSelectionStart() + mTextView.getSelectionEnd()) / 2; stopSelectionActionMode(); Selection.setSelection((Spannable) mTextView.getText(), middle); showSuggestions(); } void onAttachedToWindow() { if (mShowErrorAfterAttach) { showError(); Loading Loading @@ -3117,10 +3124,6 @@ public class Editor { mCustomSelectionActionModeCallback.onActionItemClicked(mode, item)) { return true; } if (item.getItemId() == TextView.ID_REPLACE) { onReplace(); return true; } return mTextView.onTextContextMenuItem(item.getItemId()); } Loading Loading @@ -3194,13 +3197,6 @@ public class Editor { } } private void onReplace() { int middle = (mTextView.getSelectionStart() + mTextView.getSelectionEnd()) / 2; stopSelectionActionMode(); Selection.setSelection((Spannable) mTextView.getText(), middle); showSuggestions(); } /** * A listener to call {@link InputMethodManager#updateCursorAnchorInfo(View, CursorAnchorInfo)} * while the input method is requesting the cursor/anchor position. Does nothing as long as Loading core/java/android/widget/TextView.java +6 −0 Original line number Diff line number Diff line Loading @@ -9051,6 +9051,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener stopSelectionActionMode(); return true; case ID_REPLACE: if (mEditor != null) { mEditor.replace(); } return true; case ID_SHARE: shareSelectedText(); return true; Loading Loading
core/java/android/widget/Editor.java +7 −11 Original line number Diff line number Diff line Loading @@ -286,6 +286,13 @@ public class Editor { mUndoManager.redo(owners, 1); // Redo 1 action. } void replace() { int middle = (mTextView.getSelectionStart() + mTextView.getSelectionEnd()) / 2; stopSelectionActionMode(); Selection.setSelection((Spannable) mTextView.getText(), middle); showSuggestions(); } void onAttachedToWindow() { if (mShowErrorAfterAttach) { showError(); Loading Loading @@ -3117,10 +3124,6 @@ public class Editor { mCustomSelectionActionModeCallback.onActionItemClicked(mode, item)) { return true; } if (item.getItemId() == TextView.ID_REPLACE) { onReplace(); return true; } return mTextView.onTextContextMenuItem(item.getItemId()); } Loading Loading @@ -3194,13 +3197,6 @@ public class Editor { } } private void onReplace() { int middle = (mTextView.getSelectionStart() + mTextView.getSelectionEnd()) / 2; stopSelectionActionMode(); Selection.setSelection((Spannable) mTextView.getText(), middle); showSuggestions(); } /** * A listener to call {@link InputMethodManager#updateCursorAnchorInfo(View, CursorAnchorInfo)} * while the input method is requesting the cursor/anchor position. Does nothing as long as Loading
core/java/android/widget/TextView.java +6 −0 Original line number Diff line number Diff line Loading @@ -9051,6 +9051,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener stopSelectionActionMode(); return true; case ID_REPLACE: if (mEditor != null) { mEditor.replace(); } return true; case ID_SHARE: shareSelectedText(); return true; Loading