Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebbb7e96 authored by Jean Chalard's avatar Jean Chalard
Browse files

Recompute safety net in debug cases instead of memorizing

Change-Id: I67f3a31db081afa4871ec441dd461c56e098c668
parent 682c2d53
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;
                }
            }