aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-08 22:22:56 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-08 22:22:56 -0800
commitde19ab878dd70ca9b2a9a3b18ee48c44a93a0b38 (patch)
tree7a4e04e05da6e22e2e6f1940fc37449912f56ade /java/src
parent5a7cb9305a03746e779770b3677ee0c9c85ea4ca (diff)
parent92146f29269a799935c00c530d05829d7f17cc9e (diff)
downloadlatinime-de19ab878dd70ca9b2a9a3b18ee48c44a93a0b38.tar.gz
latinime-de19ab878dd70ca9b2a9a3b18ee48c44a93a0b38.tar.xz
latinime-de19ab878dd70ca9b2a9a3b18ee48c44a93a0b38.zip
Merge "Remove useless tests (B5)"
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java15
1 files changed, 5 insertions, 10 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index a00cccab2..b6a7ce74a 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -277,11 +277,9 @@ public class Suggest implements Dictionary.WordCallback {
final String consideredWord = mTrailingSingleQuotesCount > 0
? typedWord.substring(0, typedWord.length() - mTrailingSingleQuotesCount)
: typedWord;
- if (typedWord != null) {
- // Treating USER_TYPED as UNIGRAM suggestion for logging now.
- LatinImeLogger.onAddSuggestedWord(typedWord, Suggest.DIC_USER_TYPED,
- Dictionary.UNIGRAM);
- }
+ // Treating USER_TYPED as UNIGRAM suggestion for logging now.
+ LatinImeLogger.onAddSuggestedWord(typedWord, Suggest.DIC_USER_TYPED,
+ Dictionary.UNIGRAM);
mConsideredWord = consideredWord;
if (wordComposer.size() <= 1 && (correctionMode == CORRECTION_FULL_BIGRAM)) {
@@ -340,8 +338,7 @@ public class Suggest implements Dictionary.WordCallback {
}
}
}
- final String consideredWordString =
- consideredWord == null ? null : consideredWord.toString();
+ final String consideredWordString = consideredWord.toString();
CharSequence whitelistedWord = capitalizeWord(mIsAllUpperCase, mIsFirstCharCapitalized,
mWhiteListDictionary.getWhitelistedWord(consideredWordString));
@@ -369,9 +366,7 @@ public class Suggest implements Dictionary.WordCallback {
}
}
- if (typedWord != null) {
- mSuggestions.add(0, typedWord.toString());
- }
+ mSuggestions.add(0, typedWord.toString());
StringUtils.removeDupes(mSuggestions);
if (DBG) {