Remove useless test
typedWord may not be null here Change-Id: I9e7afb89fafbf6fcbc91fbc132aecc06aec8979f
This commit is contained in:
parent
d48b76267a
commit
838629aea0
1 changed files with 11 additions and 13 deletions
|
@ -1853,7 +1853,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
// in most cases, suggestion count is 1 when typed word's length is 1, but we do always
|
// in most cases, suggestion count is 1 when typed word's length is 1, but we do always
|
||||||
// need to clear the previous state when the user starts typing a word (i.e. typed word's
|
// need to clear the previous state when the user starts typing a word (i.e. typed word's
|
||||||
// length == 1).
|
// length == 1).
|
||||||
if (typedWord != null) {
|
|
||||||
if (builder.size() > 1 || typedWord.length() == 1 || (!allowsToBeAutoCorrected)
|
if (builder.size() > 1 || typedWord.length() == 1 || (!allowsToBeAutoCorrected)
|
||||||
|| mSuggestionsView.isShowingAddToDictionaryHint()) {
|
|| mSuggestionsView.isShowingAddToDictionaryHint()) {
|
||||||
builder.setTypedWordValid(!allowsToBeAutoCorrected).setHasMinimalSuggestion(
|
builder.setTypedWordValid(!allowsToBeAutoCorrected).setHasMinimalSuggestion(
|
||||||
|
@ -1868,7 +1867,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
}
|
}
|
||||||
builder.addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions);
|
builder.addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (Suggest.shouldBlockAutoCorrectionBySafetyNet(builder, mSuggest,
|
if (Suggest.shouldBlockAutoCorrectionBySafetyNet(builder, mSuggest,
|
||||||
mSettingsValues.mAutoCorrectionThreshold)) {
|
mSettingsValues.mAutoCorrectionThreshold)) {
|
||||||
builder.setShouldBlockAutoCorrectionBySafetyNet();
|
builder.setShouldBlockAutoCorrectionBySafetyNet();
|
||||||
|
|
Loading…
Reference in a new issue