diff options
author | 2012-03-09 22:00:23 +0900 | |
---|---|---|
committer | 2012-03-09 22:00:23 +0900 | |
commit | ebbb7e9665b2f9bce46ddc2daa82b9ef73f6c712 (patch) | |
tree | 1def00cb8cf5729bed62d1133f38cb003f980d8a /java/src | |
parent | 682c2d53cc5a8ec9d79e4fe4276c6e940c8f251e (diff) | |
download | latinime-ebbb7e9665b2f9bce46ddc2daa82b9ef73f6c712.tar.gz latinime-ebbb7e9665b2f9bce46ddc2daa82b9ef73f6c712.tar.xz latinime-ebbb7e9665b2f9bce46ddc2daa82b9ef73f6c712.zip |
Recompute safety net in debug cases instead of memorizing
Change-Id: I67f3a31db081afa4871ec441dd461c56e098c668
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java index 075fb68ee..462733f96 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java @@ -60,6 +60,7 @@ import com.android.inputmethod.keyboard.PointerTracker; import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.StaticInnerHandlerWrapper; +import com.android.inputmethod.latin.Suggest; import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; @@ -329,8 +330,11 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, color = mColorTypedWord; } if (LatinImeLogger.sDBG) { + // If we auto-correct, then the autocorrection is in slot 0 and the typed word + // is in slot 1. if (index == mCenterSuggestionIndex && suggestedWords.mHasAutoCorrectionCandidate - && suggestedWords.mShouldBlockAutoCorrectionBySafetyNet) { + && Suggest.shouldBlockAutoCorrectionBySafetyNet( + suggestedWords.getWord(1).toString(), suggestedWords.getWord(0))) { return 0xFFFF0000; } } |