diff options
author | 2012-06-28 17:06:48 +0900 | |
---|---|---|
committer | 2012-06-29 15:44:17 +0900 | |
commit | 19d02c19d0af940af358f6f91abb314330a3c60e (patch) | |
tree | edbee19270b59bd4f3fa704ef8d70fb07fd46449 /java/src | |
parent | 4d5e7235c566345a54121bfe5e53f58df1274352 (diff) | |
download | latinime-19d02c19d0af940af358f6f91abb314330a3c60e.tar.gz latinime-19d02c19d0af940af358f6f91abb314330a3c60e.tar.xz latinime-19d02c19d0af940af358f6f91abb314330a3c60e.zip |
Remove a useless variable (A21)
Change-Id: I901e6b0e2b994128da19d68233b9f68bb308cb95
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 3a24c9f44..9bbc5314f 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -228,15 +228,15 @@ public class Suggest { final boolean hasAutoCorrection; if (isCorrectionEnabled) { - final SuggestedWordInfo bestSuggestion = suggestionsSet.isEmpty() - ? null : suggestionsSet.first(); if (null != whitelistedWord) { hasAutoCorrection = true; } else if (!AutoCorrection.isWhitelistedOrNotAWord( mDictionaries, consideredWord, false)) { hasAutoCorrection = true; - } else if (AutoCorrection.hasAutoCorrectionForBinaryDictionary(bestSuggestion, - consideredWord, mAutoCorrectionThreshold)) { + } else if (suggestionsSet.isEmpty()) { + hasAutoCorrection = false; + } else if (AutoCorrection.hasAutoCorrectionForBinaryDictionary(suggestionsSet.first(), + consideredWord, mAutoCorrectionThreshold)) { hasAutoCorrection = true; } else { hasAutoCorrection = false; |