aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-09 16:41:35 +0900
committerJean Chalard <jchalard@google.com>2012-03-09 16:41:35 +0900
commit195419b1ecb6d3fa8d7c6f4f7322c9d5a516b86f (patch)
tree58c78afcf13cac8093cf68f8b188ee188c741074 /java/src
parentdf0c7711a73e77b73dce7aee2a95e452b6806fc2 (diff)
downloadlatinime-195419b1ecb6d3fa8d7c6f4f7322c9d5a516b86f.tar.gz
latinime-195419b1ecb6d3fa8d7c6f4f7322c9d5a516b86f.tar.xz
latinime-195419b1ecb6d3fa8d7c6f4f7322c9d5a516b86f.zip
Small reorganization
...resulting in a slight optimization Change-Id: I83a9b8c92c3d93ce75988285997ec138b3ffe52e
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index a3f422c9c..650909414 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1857,6 +1857,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|| mSuggestionsView.isShowingAddToDictionaryHint()) {
builder.setTypedWordValid(!allowsToBeAutoCorrected).setHasMinimalSuggestion(
autoCorrectionAvailable);
+ if (Suggest.shouldBlockAutoCorrectionBySafetyNet(builder, mSuggest,
+ mSettingsValues.mAutoCorrectionThreshold)) {
+ builder.setShouldBlockAutoCorrectionBySafetyNet();
+ }
+ showSuggestions(builder.build(), typedWord);
} else {
SuggestedWords previousSuggestions = mSuggestionsView.getSuggestions();
if (previousSuggestions == mSettingsValues.mSuggestPuncList) {
@@ -1866,12 +1871,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
previousSuggestions = SuggestedWords.EMPTY;
}
builder.addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions);
+ showSuggestions(builder.build(), typedWord);
}
- if (Suggest.shouldBlockAutoCorrectionBySafetyNet(builder, mSuggest,
- mSettingsValues.mAutoCorrectionThreshold)) {
- builder.setShouldBlockAutoCorrectionBySafetyNet();
- }
- showSuggestions(builder.build(), typedWord);
}
public void showSuggestions(final SuggestedWords suggestedWords, final CharSequence typedWord) {