aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-07-05 01:56:55 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-07-05 01:56:55 -0700
commit9636735c0a082d4b23a9ffbd39bd86ed1f6f023c (patch)
tree95f5ae9080d2693bb1bb5bd9b47efa603955758f /java/src
parent21524c755c97f93f451bbdf4106bf2906aa31ea9 (diff)
parent4cba560dbbd8696673642d1a10d2d433418e54e2 (diff)
downloadlatinime-9636735c0a082d4b23a9ffbd39bd86ed1f6f023c.tar.gz
latinime-9636735c0a082d4b23a9ffbd39bd86ed1f6f023c.tar.xz
latinime-9636735c0a082d4b23a9ffbd39bd86ed1f6f023c.zip
Merge "Small simplification (A52)"
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java12
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 3b6c34499..b33948ef2 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1930,21 +1930,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() {