Skip to content

Commit 69609ed

Browse files
satok16Android (Google) Code Review
authored andcommitted
Merge "Do not run the spell checker in SearchView" into jb-dev
2 parents 0c01222 + 9ce1116 commit 69609ed

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/java/android/widget/SearchView.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,13 @@ private void updateSearchAutoComplete() {
10911091
inputType &= ~InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE;
10921092
if (mSearchable.getSuggestAuthority() != null) {
10931093
inputType |= InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE;
1094+
// TYPE_TEXT_FLAG_AUTO_COMPLETE means that the text editor is performing
1095+
// auto-completion based on its own semantics, which it will present to the user
1096+
// as they type. This generally means that the input method should not show its
1097+
// own candidates, and the spell checker should not be in action. The text editor
1098+
// supplies its candidates by calling InputMethodManager.displayCompletions(),
1099+
// which in turn will call InputMethodSession.displayCompletions().
1100+
inputType |= InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
10941101
}
10951102
}
10961103
mQueryTextView.setInputType(inputType);

0 commit comments

Comments
 (0)