| 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 9f296ceef16e9c55c63621923cdd967c8df31324..edae5444f0abbf27738f4d62fb3aa5a66e8e7680 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
|
| @@ -205,7 +205,7 @@ public class ContextualSearchSelectionController {
|
| if (baseContentView != null) {
|
| baseContentView.clearSelection();
|
| }
|
| - resetAllStates();
|
| + resetSelectionStates();
|
| }
|
|
|
| /**
|
| @@ -351,10 +351,12 @@ public class ContextualSearchSelectionController {
|
| * or #handleNonSuppressedTap() after a possible delay.
|
| * This should be called when the context is fully built (by gathering surrounding text
|
| * if needed, etc) but before showing any UX.
|
| + * @param contextualSearchContext The {@link ContextualSearchContext} for the Tap gesture.
|
| * @param rankerLogger The {@link ContextualSearchRankerLogger} currently being used to measure
|
| * or suppress the UI by Ranker.
|
| */
|
| - void handleShouldSuppressTap(ContextualSearchRankerLogger rankerLogger) {
|
| + void handleShouldSuppressTap(ContextualSearchContext contextualSearchContext,
|
| + ContextualSearchRankerLogger rankerLogger) {
|
| int x = (int) mX;
|
| int y = (int) mY;
|
|
|
| @@ -362,9 +364,8 @@ public class ContextualSearchSelectionController {
|
| ChromePreferenceManager prefs = ChromePreferenceManager.getInstance();
|
| int adjustedTapsSinceOpen = prefs.getContextualSearchTapCount()
|
| - prefs.getContextualSearchTapQuickAnswerCount();
|
| - TapSuppressionHeuristics tapHeuristics =
|
| - new TapSuppressionHeuristics(this, mLastTapState, x, y, adjustedTapsSinceOpen);
|
| -
|
| + TapSuppressionHeuristics tapHeuristics = new TapSuppressionHeuristics(
|
| + this, mLastTapState, x, y, adjustedTapsSinceOpen, contextualSearchContext);
|
| // TODO(donnd): Move to be called when the panel closes to work with states that change.
|
| tapHeuristics.logConditionState();
|
|
|
|
|