summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Abodunrinwa Toki <toki@google.com> 2017-02-01 10:51:02 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2017-02-01 10:51:06 +0000
commit8e332cc54b203a3fe7a014e506c3fcc07a60e539 (patch)
treeb90d845503b6b127ad548562f94fd96babf150fa
parent5668955ecd3b3e79cca660b4c04f1486f7c1e586 (diff)
parentf9a81f352ea7819793387202ce6894cc97df5b6f (diff)
Merge "Ignore smart selection for multi-word selections."
-rw-r--r--core/java/android/widget/Editor.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index f7f9a81e45c1..c1834f1b79ff 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -1984,12 +1984,12 @@ public class Editor {
if (mRestartActionModeOnNextRefresh) {
// To avoid distraction, newly start action mode only when selection action
// mode is being restarted.
- startSelectionActionMode(getTextClassifierInfo(true));
+ startSelectionActionMode(null);
}
} else if (selectionController == null || !selectionController.isActive()) {
// Insertion action mode is active. Avoid dismissing the selection.
stopTextActionModeWithPreservingSelection();
- startSelectionActionMode(getTextClassifierInfo(true));
+ startSelectionActionMode(null);
} else {
mTextActionMode.invalidateContentRect();
}
@@ -5496,8 +5496,9 @@ public class Editor {
resetDragAcceleratorState();
if (mTextView.hasSelection()) {
- // TODO: Do not invoke the text assistant if this was a drag selection.
- startSelectionActionMode(getTextClassifierInfo(true));
+ // Do not invoke the text assistant if this was a drag selection.
+ startSelectionActionMode(
+ mHaventMovedEnoughToStartDrag ? getTextClassifierInfo(true) : null);
}
break;
}