Loading java/src/com/android/inputmethod/latin/LatinIME.java +5 −1 Original line number Diff line number Diff line Loading @@ -2038,10 +2038,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if (mCorrectionMode == Suggest.CORRECTION_FULL_BIGRAM) { final CharSequence prevWord = EditingUtils.getThisWord(getCurrentInputConnection(), mSettingsValues.mWordSeparators); if (!TextUtils.isEmpty(prevWord)) { builder = mSuggest.getBigramPredictionWordBuilder(prevWord); } else { builder = null; } } else { builder = null; } if (null == builder || builder.size() > 0) { // Explicitly supply an empty typed word (the no-second-arg version of Loading java/src/com/android/inputmethod/latin/Suggest.java +11 −15 Original line number Diff line number Diff line Loading @@ -276,9 +276,6 @@ public class Suggest implements Dictionary.WordCallback { Arrays.fill(mBigramScores, 0); collectGarbage(mBigramSuggestions, PREF_MAX_BIGRAMS); // Note that if prevWordForBigram is empty, we'll always return the same empty // SuggestedWords.Builder if (!TextUtils.isEmpty(prevWordForBigram)) { CharSequence lowerPrevWord = prevWordForBigram.toString().toLowerCase(); if (mMainDict != null && mMainDict.isValidWord(lowerPrevWord)) { prevWordForBigram = lowerPrevWord; Loading @@ -291,7 +288,6 @@ public class Suggest implements Dictionary.WordCallback { for (int i = 0; i < insertCount; ++i) { addBigramToSuggestions(mBigramSuggestions.get(i)); } } StringUtils.removeDupes(mSuggestions); Loading Loading
java/src/com/android/inputmethod/latin/LatinIME.java +5 −1 Original line number Diff line number Diff line Loading @@ -2038,10 +2038,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if (mCorrectionMode == Suggest.CORRECTION_FULL_BIGRAM) { final CharSequence prevWord = EditingUtils.getThisWord(getCurrentInputConnection(), mSettingsValues.mWordSeparators); if (!TextUtils.isEmpty(prevWord)) { builder = mSuggest.getBigramPredictionWordBuilder(prevWord); } else { builder = null; } } else { builder = null; } if (null == builder || builder.size() > 0) { // Explicitly supply an empty typed word (the no-second-arg version of Loading
java/src/com/android/inputmethod/latin/Suggest.java +11 −15 Original line number Diff line number Diff line Loading @@ -276,9 +276,6 @@ public class Suggest implements Dictionary.WordCallback { Arrays.fill(mBigramScores, 0); collectGarbage(mBigramSuggestions, PREF_MAX_BIGRAMS); // Note that if prevWordForBigram is empty, we'll always return the same empty // SuggestedWords.Builder if (!TextUtils.isEmpty(prevWordForBigram)) { CharSequence lowerPrevWord = prevWordForBigram.toString().toLowerCase(); if (mMainDict != null && mMainDict.isValidWord(lowerPrevWord)) { prevWordForBigram = lowerPrevWord; Loading @@ -291,7 +288,6 @@ public class Suggest implements Dictionary.WordCallback { for (int i = 0; i < insertCount; ++i) { addBigramToSuggestions(mBigramSuggestions.get(i)); } } StringUtils.removeDupes(mSuggestions); Loading