aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-09 18:04:44 +0900
committerJean Chalard <jchalard@google.com>2012-03-09 18:38:44 +0900
commitf08f30176b2020b36fa6ee856d9a0b84ee5b1fba (patch)
treecb3a091f426d801c248d5e9ad12159aab5758588 /java/src
parentde165aed2ab9bfa13b5227cfe29d0770092db468 (diff)
downloadlatinime-f08f30176b2020b36fa6ee856d9a0b84ee5b1fba.tar.gz
latinime-f08f30176b2020b36fa6ee856d9a0b84ee5b1fba.tar.xz
latinime-f08f30176b2020b36fa6ee856d9a0b84ee5b1fba.zip
Reduction, step 1
Change-Id: Ic3ed04300cfd4c0b69b93b27379aca4093b32f67
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 7c4d91e80..ffe96a08c 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -266,13 +266,13 @@ public class Suggest implements Dictionary.WordCallback {
final WordComposer wordComposer = sEmptyWordComposer;
LatinImeLogger.onStartSuggestion(prevWordForBigram);
- mIsFirstCharCapitalized = wordComposer.isFirstCharCapitalized();
- mIsAllUpperCase = wordComposer.isAllUpperCase();
- mTrailingSingleQuotesCount = wordComposer.trailingSingleQuotesCount();
+ mIsFirstCharCapitalized = false;
+ mIsAllUpperCase = false;
+ mTrailingSingleQuotesCount = 0;
collectGarbage(mSuggestions, mPrefMaxSuggestions);
Arrays.fill(mScores, 0);
- final String typedWord = wordComposer.getTypedWord();
+ final String typedWord = "";
final String consideredWord = mTrailingSingleQuotesCount > 0
? typedWord.substring(0, typedWord.length() - mTrailingSingleQuotesCount)
: typedWord;
@@ -287,9 +287,9 @@ public class Suggest implements Dictionary.WordCallback {
// a boolean flag. Right now this is handled with a slight hack in
// WhitelistDictionary#shouldForciblyAutoCorrectFrom.
final boolean allowsToBeAutoCorrected = AutoCorrection.allowsToBeAutoCorrected(
- getUnigramDictionaries(), consideredWord, wordComposer.isFirstCharCapitalized());
+ getUnigramDictionaries(), consideredWord, false);
- if (wordComposer.size() <= 1 && (correctionMode == CORRECTION_FULL_BIGRAM)) {
+ if (0 <= 1 && (correctionMode == CORRECTION_FULL_BIGRAM)) {
// At first character typed, search only the bigrams
Arrays.fill(mBigramScores, 0);
collectGarbage(mBigramSuggestions, PREF_MAX_BIGRAMS);
@@ -327,7 +327,7 @@ public class Suggest implements Dictionary.WordCallback {
}
}
- } else if (wordComposer.size() > 1) {
+ } else if (0 > 1) {
// At second character typed, search the unigrams (scores being affected by bigrams)
for (final String key : mUnigramDictionaries.keySet()) {
// Skip UserUnigramDictionary and WhitelistDictionary to lookup