Remove a useless variable (A20)

Change-Id: Ifc37462f5243563693c8cd7cbeb401ff054daa52
main
Jean Chalard 2012-06-28 17:04:12 +09:00
parent 739683dcfb
commit 4d5e7235c5
1 changed files with 4 additions and 6 deletions

View File

@ -230,19 +230,17 @@ public class Suggest {
if (isCorrectionEnabled) { if (isCorrectionEnabled) {
final SuggestedWordInfo bestSuggestion = suggestionsSet.isEmpty() final SuggestedWordInfo bestSuggestion = suggestionsSet.isEmpty()
? null : suggestionsSet.first(); ? null : suggestionsSet.first();
final CharSequence autoCorrection;
if (null != whitelistedWord) { if (null != whitelistedWord) {
autoCorrection = whitelistedWord; hasAutoCorrection = true;
} else if (!AutoCorrection.isWhitelistedOrNotAWord( } else if (!AutoCorrection.isWhitelistedOrNotAWord(
mDictionaries, consideredWord, false)) { mDictionaries, consideredWord, false)) {
autoCorrection = consideredWord; hasAutoCorrection = true;
} else if (AutoCorrection.hasAutoCorrectionForBinaryDictionary(bestSuggestion, } else if (AutoCorrection.hasAutoCorrectionForBinaryDictionary(bestSuggestion,
consideredWord, mAutoCorrectionThreshold)) { consideredWord, mAutoCorrectionThreshold)) {
autoCorrection = bestSuggestion.mWord; hasAutoCorrection = true;
} else { } else {
autoCorrection = null; hasAutoCorrection = false;
} }
hasAutoCorrection = (null != autoCorrection);
} else { } else {
hasAutoCorrection = false; hasAutoCorrection = false;
} }