From 7184c8aaf1c1bae4f6b1e31125342c6d023e1ec5 Mon Sep 17 00:00:00 2001 From: Clara Bayarri Date: Fri, 5 Jun 2015 17:34:09 +0100 Subject: [PATCH] Remove insertion action mode runnable on selection start This was in a previous change and accidentally got reverted on a rebase. When going from an Insertion to a Selection/Drag Mode we want to make sure no insertion modes are started by pending requests. Previous change with accidental rebase: I91bcd0d9c3e68d9c736698fe0bec010b4c9f5cf3 Bug: 21647271 Change-Id: I32c152494d236b693a489ea97448904163c9620a --- core/java/android/widget/Editor.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java index e17594996d1e3..cd110b7bf1df5 100644 --- a/core/java/android/widget/Editor.java +++ b/core/java/android/widget/Editor.java @@ -1752,11 +1752,10 @@ public class Editor { * @return true if the drag was started. */ private boolean selectCurrentWordAndStartDrag() { + if (mInsertionActionModeRunnable != null) { + mTextView.removeCallbacks(mInsertionActionModeRunnable); + } if (extractedTextModeWillBeStarted()) { - // Cancel the single tap delayed runnable. - if (mInsertionActionModeRunnable != null) { - mTextView.removeCallbacks(mInsertionActionModeRunnable); - } return false; } if (mTextActionMode != null) {