[TTS] Fix ML bug: tap near previous selection, initialization.
Fixes a problem with ML not being applied correctly on a "retap", a tap near the previous selection. The problem is that the Search is still in progress and the Bar still active when the retap is processed. Adds a new Internal State TAP_GESTURE_COMMIT that allows code to run during the initial stage of tap gesture processing. This new state is used to handle the retap by detecting if the panel is still open. Loading the Ranker predictor is now moved to an earlier stage of tap processing (using the new internal state) to allow it to be fully loaded and ready to predict by the time all the prediction features have been gathered. Refactored writing the outcomes to Ranker in ContextualSearchPanelMetrics so it can be called when appropriate. Now logging outcomes and resetting the CSRankerLogger is done whenever the UI is hidden or a retap is detected. BUG=783995 Change-Id: I3122a20200696682205379fdd619e655262520f9 Reviewed-on: https://chromium-review.googlesource.com/802540 Commit-Queue: Donn Denman <donnd@chromium.org> Reviewed-by:Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#524452}
Showing
Please register or sign in to comment