| Index: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
|
| index 3a3630cd1a4f1a7eaba0adcdffa1033996b49b39..f57adfc3d1ee158c41a0b631b951ee59a7ecbbb4 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
|
| @@ -5,6 +5,7 @@
|
| package org.chromium.chrome.browser.contextualsearch;
|
|
|
| import android.os.Handler;
|
| +import android.text.TextUtils;
|
|
|
| import org.chromium.base.VisibleForTesting;
|
| import org.chromium.chrome.browser.ChromeActivity;
|
| @@ -69,7 +70,6 @@ public class ContextualSearchSelectionController {
|
| private ContextualSearchTapState mLastTapState;
|
| private TapSuppressionHeuristics mTapHeuristics;
|
| private boolean mIsWaitingForInvalidTapDetection;
|
| - private boolean mIsSelectionEstablished;
|
| private boolean mShouldHandleSelectionModification;
|
| private boolean mDidExpandSelection;
|
|
|
| @@ -296,12 +296,6 @@ public class ContextualSearchSelectionController {
|
| case SelectionEventType.SELECTION_HANDLE_DRAG_STOPPED:
|
| shouldHandleSelection = mShouldHandleSelectionModification;
|
| break;
|
| - case SelectionEventType.SELECTION_ESTABLISHED:
|
| - mIsSelectionEstablished = true;
|
| - break;
|
| - case SelectionEventType.SELECTION_DISSOLVED:
|
| - mIsSelectionEstablished = false;
|
| - break;
|
| default:
|
| }
|
|
|
| @@ -513,11 +507,11 @@ public class ContextualSearchSelectionController {
|
| }
|
|
|
| /**
|
| - * @return whether the selection has been established, for testing.
|
| + * @return whether selection is empty, for testing.
|
| */
|
| @VisibleForTesting
|
| - boolean isSelectionEstablished() {
|
| - return mIsSelectionEstablished;
|
| + boolean isSelectionEmpty() {
|
| + return TextUtils.isEmpty(mSelectedText);
|
| }
|
|
|
| /**
|
|
|