diff options
author | 2012-06-29 16:00:18 +0900 | |
---|---|---|
committer | 2012-07-05 17:22:00 +0900 | |
commit | 4cba560dbbd8696673642d1a10d2d433418e54e2 (patch) | |
tree | 59fccc669de751810dd70fdc3571a2e3f83b4415 /java/src | |
parent | ea80794dd43d44fe53884b4b8f4567af3d0e8331 (diff) | |
download | latinime-4cba560dbbd8696673642d1a10d2d433418e54e2.tar.gz latinime-4cba560dbbd8696673642d1a10d2d433418e54e2.tar.xz latinime-4cba560dbbd8696673642d1a10d2d433418e54e2.zip |
Small simplification (A52)
Change-Id: I56bc5b9b584de5a14b41fc32c19f7fefb3b12e88
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 387a3f7ce..930c9cfd1 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1934,21 +1934,17 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } private SuggestedWords updateBigramPredictions(final CharSequence typedWord) { - final SuggestedWords suggestedWords; if (mCurrentSettings.mCorrectionEnabled) { final CharSequence prevWord = mConnection.getThisWord(mCurrentSettings.mWordSeparators); if (!TextUtils.isEmpty(prevWord)) { - suggestedWords = mSuggest.getSuggestedWords(mWordComposer, + // If we call getSuggestedWord with mCorrectionEnabled == false or with + // an empty prevWord, we'll get a 0-sized list of suggestions. + return mSuggest.getSuggestedWords(mWordComposer, prevWord, mKeyboardSwitcher.getKeyboard().getProximityInfo(), mCurrentSettings.mCorrectionEnabled, true); - } else { - suggestedWords = null; } - } else { - suggestedWords = null; } - - return suggestedWords; + return null; } public void setPunctuationSuggestions() { |