diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 98bdef606..904574519 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1838,7 +1838,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar final boolean shouldBlockAutoCorrectionBySafetyNet = Utils.shouldBlockAutoCorrectionBySafetyNet(suggestedWords, mSuggest); if (shouldBlockAutoCorrectionBySafetyNet) { - suggestedWords.setShouldBlockAutoCorrection(); + suggestedWords.setShouldBlockAutoCorrectionBySatefyNet(); } final CharSequence autoCorrection; if (suggestedWords.size() > 0) { diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index 993ae3b42..78922978a 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -32,7 +32,7 @@ public class SuggestedWords { public final boolean mHasAutoCorrectionCandidate; public final boolean mIsPunctuationSuggestions; private final List mSuggestedWordInfoList; - private boolean mShouldBlockAutoCorrection; + private boolean mShouldBlockAutoCorrectionBySafetyNet; private SuggestedWords(List words, boolean typedWordValid, boolean hasAutoCorrectionCandidate, boolean isPunctuationSuggestions, @@ -46,7 +46,7 @@ public class SuggestedWords { mHasAutoCorrectionCandidate = hasAutoCorrectionCandidate; mIsPunctuationSuggestions = isPunctuationSuggestions; mSuggestedWordInfoList = suggestedWordInfoList; - mShouldBlockAutoCorrection = false; + mShouldBlockAutoCorrectionBySafetyNet = false; } public int size() { @@ -69,12 +69,12 @@ public class SuggestedWords { return mIsPunctuationSuggestions; } - public void setShouldBlockAutoCorrection() { - mShouldBlockAutoCorrection = true; + public void setShouldBlockAutoCorrectionBySatefyNet() { + mShouldBlockAutoCorrectionBySafetyNet = true; } - public boolean shouldBlockAutoCorrection() { - return mShouldBlockAutoCorrection; + public boolean shouldBlockAutoCorrectionBySafetyNet() { + return mShouldBlockAutoCorrectionBySafetyNet; } public static class Builder { diff --git a/java/src/com/android/inputmethod/latin/Utils.java b/java/src/com/android/inputmethod/latin/Utils.java index 47ea9ee8a..6e8017d94 100644 --- a/java/src/com/android/inputmethod/latin/Utils.java +++ b/java/src/com/android/inputmethod/latin/Utils.java @@ -776,7 +776,7 @@ public class Utils { public static boolean willAutoCorrect(SuggestedWords suggestions) { return !suggestions.mTypedWordValid && suggestions.mHasAutoCorrectionCandidate - && !suggestions.shouldBlockAutoCorrection(); + && !suggestions.shouldBlockAutoCorrectionBySafetyNet(); } public static class Stats { diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java index 40d782640..9ab8c01e6 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java @@ -308,7 +308,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, } if (LatinImeLogger.sDBG) { if (index == mCenterSuggestionIndex && suggestions.mHasAutoCorrectionCandidate - && suggestions.shouldBlockAutoCorrection()) { + && suggestions.shouldBlockAutoCorrectionBySafetyNet()) { return 0xFFFF0000; } }