Commit b789be39 authored by donnd's avatar donnd Committed by Commit bot

[TTS] Fix flaky second-tap on tap-selection.

When a Tap selection is present, a second tap shows the pins, and
the Bar should keep showing.  However this seems to currently be
flaky.

This CL adds a check when a Tap is recognized to see if we're
already showing a Tap-selection.  We were incorrectly starting
a Tap sequence in response to this second tap but that's not
needed since we'll soon get a message for the Long-press gesture
when the pins show.

BUG=717942

Review-Url: https://codereview.chromium.org/2853393003
Cr-Commit-Position: refs/heads/master@{#469033}
parent eb843b04
......@@ -293,7 +293,12 @@ class ContextualSearchInternalStateController {
reset(StateChangeReason.BASE_PAGE_TAP);
break;
case TAP_RECOGNIZED:
transitionTo(InternalState.GATHERING_SURROUNDINGS);
if (mPreviousState == InternalState.SHOWING_TAP_SEARCH) {
// This is a second-tap on a Tap-selection.
// We'll soon recognize a Long-press and show the edit pins, so nothing needed.
} else {
transitionTo(InternalState.GATHERING_SURROUNDINGS);
}
break;
case GATHERING_SURROUNDINGS:
// We gather surroundings for both Tap and Long-press in order to notify icing.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment