Loading core/java/android/widget/Editor.java +2 −3 Original line number Diff line number Diff line Loading @@ -1121,7 +1121,6 @@ public class Editor { if (mTemporaryDetach) mPreserveDetachedSelection = false; downgradeEasyCorrectionSpans(); } // No need to create the controller if (mSelectionModifierCursorController != null) { mSelectionModifierCursorController.resetTouchOffsets(); Loading Loading @@ -1793,7 +1792,7 @@ public class Editor { * * @return true if there already was a selection or if the current word was selected. */ private boolean checkFieldAndSelectCurrentWord() { boolean checkFieldAndSelectCurrentWord() { if (!mTextView.canSelectText() || !mTextView.requestFocus()) { Log.w(TextView.LOG_TAG, "TextView does not support text selection. Selection cancelled."); Loading Loading @@ -1840,7 +1839,7 @@ public class Editor { return selectionStarted; } private boolean extractedTextModeWillBeStarted() { boolean extractedTextModeWillBeStarted() { if (!(mTextView.isInExtractedMode())) { final InputMethodManager imm = InputMethodManager.peekInstance(); return imm != null && imm.isFullscreenMode(); Loading core/java/android/widget/TextView.java +5 −1 Original line number Diff line number Diff line Loading @@ -5232,7 +5232,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener // - onFocusChanged cannot start it when focus is given to a view with selected text (after // a screen rotation) since layout is not yet initialized at that point. if (mEditor != null && mEditor.mCreatedWithASelection) { if (mEditor.extractedTextModeWillBeStarted()) { mEditor.checkFieldAndSelectCurrentWord(); } else { mEditor.startSelectionActionMode(); } mEditor.mCreatedWithASelection = false; } Loading Loading
core/java/android/widget/Editor.java +2 −3 Original line number Diff line number Diff line Loading @@ -1121,7 +1121,6 @@ public class Editor { if (mTemporaryDetach) mPreserveDetachedSelection = false; downgradeEasyCorrectionSpans(); } // No need to create the controller if (mSelectionModifierCursorController != null) { mSelectionModifierCursorController.resetTouchOffsets(); Loading Loading @@ -1793,7 +1792,7 @@ public class Editor { * * @return true if there already was a selection or if the current word was selected. */ private boolean checkFieldAndSelectCurrentWord() { boolean checkFieldAndSelectCurrentWord() { if (!mTextView.canSelectText() || !mTextView.requestFocus()) { Log.w(TextView.LOG_TAG, "TextView does not support text selection. Selection cancelled."); Loading Loading @@ -1840,7 +1839,7 @@ public class Editor { return selectionStarted; } private boolean extractedTextModeWillBeStarted() { boolean extractedTextModeWillBeStarted() { if (!(mTextView.isInExtractedMode())) { final InputMethodManager imm = InputMethodManager.peekInstance(); return imm != null && imm.isFullscreenMode(); Loading
core/java/android/widget/TextView.java +5 −1 Original line number Diff line number Diff line Loading @@ -5232,7 +5232,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener // - onFocusChanged cannot start it when focus is given to a view with selected text (after // a screen rotation) since layout is not yet initialized at that point. if (mEditor != null && mEditor.mCreatedWithASelection) { if (mEditor.extractedTextModeWillBeStarted()) { mEditor.checkFieldAndSelectCurrentWord(); } else { mEditor.startSelectionActionMode(); } mEditor.mCreatedWithASelection = false; } Loading