mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Recompute safety net in debug cases instead of memorizing
Change-Id: I67f3a31db081afa4871ec441dd461c56e098c668
This commit is contained in:
parent
682c2d53cc
commit
ebbb7e9665
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user