Remove a useless variable (A20)
Change-Id: Ifc37462f5243563693c8cd7cbeb401ff054daa52main
parent
739683dcfb
commit
4d5e7235c5
|
@ -230,19 +230,17 @@ public class Suggest {
|
|||
if (isCorrectionEnabled) {
|
||||
final SuggestedWordInfo bestSuggestion = suggestionsSet.isEmpty()
|
||||
? null : suggestionsSet.first();
|
||||
final CharSequence autoCorrection;
|
||||
if (null != whitelistedWord) {
|
||||
autoCorrection = whitelistedWord;
|
||||
hasAutoCorrection = true;
|
||||
} else if (!AutoCorrection.isWhitelistedOrNotAWord(
|
||||
mDictionaries, consideredWord, false)) {
|
||||
autoCorrection = consideredWord;
|
||||
hasAutoCorrection = true;
|
||||
} else if (AutoCorrection.hasAutoCorrectionForBinaryDictionary(bestSuggestion,
|
||||
consideredWord, mAutoCorrectionThreshold)) {
|
||||
autoCorrection = bestSuggestion.mWord;
|
||||
hasAutoCorrection = true;
|
||||
} else {
|
||||
autoCorrection = null;
|
||||
hasAutoCorrection = false;
|
||||
}
|
||||
hasAutoCorrection = (null != autoCorrection);
|
||||
} else {
|
||||
hasAutoCorrection = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue