Commit a4bedf75 authored by John Palmer's avatar John Palmer Committed by Commit Bot

Make assistive suggester still send surroundingTextChanged updates

Bug: b/168670584
Change-Id: Ifd45b0ccf4484cc9040ff30eded589122a8e53d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2417671
Auto-Submit: John Palmer <jopalmer@chromium.org>
Reviewed-by: default avatarJing Wang <jiwan@chromium.org>
Reviewed-by: default avatarMy Nguyen <myy@chromium.org>
Commit-Queue: My Nguyen <myy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808315}
parent ebdd5a75
...@@ -236,12 +236,8 @@ void NativeInputMethodEngine::ImeObserver::OnSurroundingTextChanged( ...@@ -236,12 +236,8 @@ void NativeInputMethodEngine::ImeObserver::OnSurroundingTextChanged(
assistive_suggester_->RecordAssistiveMatchMetrics(text, cursor_pos, assistive_suggester_->RecordAssistiveMatchMetrics(text, cursor_pos,
anchor_pos); anchor_pos);
if (assistive_suggester_->IsAssistiveFeatureEnabled()) { if (assistive_suggester_->IsAssistiveFeatureEnabled()) {
// If |assistive_suggester_| changes the surrounding text, no longer need assistive_suggester_->OnSurroundingTextChanged(text, cursor_pos,
// to call the following function, as the information is out-dated. anchor_pos);
if (assistive_suggester_->OnSurroundingTextChanged(text, cursor_pos,
anchor_pos)) {
return;
}
} }
base_observer_->OnSurroundingTextChanged(engine_id, text, cursor_pos, base_observer_->OnSurroundingTextChanged(engine_id, text, cursor_pos,
anchor_pos, offset_pos); anchor_pos, offset_pos);
......
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