Support resetting "smart selection" to any word in the selection.
Test: See topic
Bug: 34779207
Change-Id: I75a9b991571f750b362047baa13675250e929223
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 481c160..4384427 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -841,7 +841,7 @@
* Adjusts selection to the word under last touch offset. Return true if the operation was
* successfully performed.
*/
- private boolean selectCurrentWord() {
+ boolean selectCurrentWord() {
if (!mTextView.canSelectText()) {
return false;
}
@@ -2186,7 +2186,7 @@
}
void onTouchUpEvent(MotionEvent event) {
- if (getSelectionActionModeHelper().resetOriginalSelection(
+ if (getSelectionActionModeHelper().resetSelection(
getTextView().getOffsetForPosition(event.getX(), event.getY()))) {
return;
}