diff options
author | 2011-10-12 23:46:25 -0700 | |
---|---|---|
committer | 2011-10-12 23:46:25 -0700 | |
commit | 22c2a23cdaa29c2de742d8ab3e8d7bf3c9f9564a (patch) | |
tree | b0ac9a8ac09c4feadee73a91b2b6e50a4cfdc2cd /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | ca922b440ac2ba5b961e9b2df33187a9182bc174 (diff) | |
parent | 605a6fea750c4acc96a5136ecaf7162e0a858b9f (diff) | |
download | latinime-22c2a23cdaa29c2de742d8ab3e8d7bf3c9f9564a.tar.gz latinime-22c2a23cdaa29c2de742d8ab3e8d7bf3c9f9564a.tar.xz latinime-22c2a23cdaa29c2de742d8ab3e8d7bf3c9f9564a.zip |
am 605a6fea: Merge "Fix the safety net Bug: 5453150" into ics-mr0
* commit '605a6fea750c4acc96a5136ecaf7162e0a858b9f':
Fix the safety net Bug: 5453150
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 18a9fd89e..70e37a9f3 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1728,9 +1728,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } public void showSuggestions(SuggestedWords suggestedWords, CharSequence typedWord) { + final boolean shouldBlockAutoCorrectionBySafetyNet = + Utils.shouldBlockAutoCorrectionBySafetyNet(suggestedWords, mSuggest); + if (shouldBlockAutoCorrectionBySafetyNet) { + suggestedWords.setShouldBlockAutoCorrection(); + } setSuggestions(suggestedWords); if (suggestedWords.size() > 0) { - if (Utils.shouldBlockedBySafetyNetForAutoCorrection(suggestedWords, mSuggest)) { + if (shouldBlockAutoCorrectionBySafetyNet) { mBestWord = typedWord; } else if (suggestedWords.hasAutoCorrectionWord()) { mBestWord = suggestedWords.getWord(1); |