Some renaming
Change-Id: I445277cb3af469a0145a8da0ffb801b7e19048cd
This commit is contained in:
parent
5edda4111e
commit
a83a53ba24
4 changed files with 9 additions and 9 deletions
|
@ -1838,7 +1838,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
final boolean shouldBlockAutoCorrectionBySafetyNet =
|
final boolean shouldBlockAutoCorrectionBySafetyNet =
|
||||||
Utils.shouldBlockAutoCorrectionBySafetyNet(suggestedWords, mSuggest);
|
Utils.shouldBlockAutoCorrectionBySafetyNet(suggestedWords, mSuggest);
|
||||||
if (shouldBlockAutoCorrectionBySafetyNet) {
|
if (shouldBlockAutoCorrectionBySafetyNet) {
|
||||||
suggestedWords.setShouldBlockAutoCorrection();
|
suggestedWords.setShouldBlockAutoCorrectionBySatefyNet();
|
||||||
}
|
}
|
||||||
final CharSequence autoCorrection;
|
final CharSequence autoCorrection;
|
||||||
if (suggestedWords.size() > 0) {
|
if (suggestedWords.size() > 0) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class SuggestedWords {
|
||||||
public final boolean mHasAutoCorrectionCandidate;
|
public final boolean mHasAutoCorrectionCandidate;
|
||||||
public final boolean mIsPunctuationSuggestions;
|
public final boolean mIsPunctuationSuggestions;
|
||||||
private final List<SuggestedWordInfo> mSuggestedWordInfoList;
|
private final List<SuggestedWordInfo> mSuggestedWordInfoList;
|
||||||
private boolean mShouldBlockAutoCorrection;
|
private boolean mShouldBlockAutoCorrectionBySafetyNet;
|
||||||
|
|
||||||
private SuggestedWords(List<CharSequence> words, boolean typedWordValid,
|
private SuggestedWords(List<CharSequence> words, boolean typedWordValid,
|
||||||
boolean hasAutoCorrectionCandidate, boolean isPunctuationSuggestions,
|
boolean hasAutoCorrectionCandidate, boolean isPunctuationSuggestions,
|
||||||
|
@ -46,7 +46,7 @@ public class SuggestedWords {
|
||||||
mHasAutoCorrectionCandidate = hasAutoCorrectionCandidate;
|
mHasAutoCorrectionCandidate = hasAutoCorrectionCandidate;
|
||||||
mIsPunctuationSuggestions = isPunctuationSuggestions;
|
mIsPunctuationSuggestions = isPunctuationSuggestions;
|
||||||
mSuggestedWordInfoList = suggestedWordInfoList;
|
mSuggestedWordInfoList = suggestedWordInfoList;
|
||||||
mShouldBlockAutoCorrection = false;
|
mShouldBlockAutoCorrectionBySafetyNet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int size() {
|
public int size() {
|
||||||
|
@ -69,12 +69,12 @@ public class SuggestedWords {
|
||||||
return mIsPunctuationSuggestions;
|
return mIsPunctuationSuggestions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setShouldBlockAutoCorrection() {
|
public void setShouldBlockAutoCorrectionBySatefyNet() {
|
||||||
mShouldBlockAutoCorrection = true;
|
mShouldBlockAutoCorrectionBySafetyNet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shouldBlockAutoCorrection() {
|
public boolean shouldBlockAutoCorrectionBySafetyNet() {
|
||||||
return mShouldBlockAutoCorrection;
|
return mShouldBlockAutoCorrectionBySafetyNet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Builder {
|
public static class Builder {
|
||||||
|
|
|
@ -776,7 +776,7 @@ public class Utils {
|
||||||
|
|
||||||
public static boolean willAutoCorrect(SuggestedWords suggestions) {
|
public static boolean willAutoCorrect(SuggestedWords suggestions) {
|
||||||
return !suggestions.mTypedWordValid && suggestions.mHasAutoCorrectionCandidate
|
return !suggestions.mTypedWordValid && suggestions.mHasAutoCorrectionCandidate
|
||||||
&& !suggestions.shouldBlockAutoCorrection();
|
&& !suggestions.shouldBlockAutoCorrectionBySafetyNet();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Stats {
|
public static class Stats {
|
||||||
|
|
|
@ -308,7 +308,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
|
||||||
}
|
}
|
||||||
if (LatinImeLogger.sDBG) {
|
if (LatinImeLogger.sDBG) {
|
||||||
if (index == mCenterSuggestionIndex && suggestions.mHasAutoCorrectionCandidate
|
if (index == mCenterSuggestionIndex && suggestions.mHasAutoCorrectionCandidate
|
||||||
&& suggestions.shouldBlockAutoCorrection()) {
|
&& suggestions.shouldBlockAutoCorrectionBySafetyNet()) {
|
||||||
return 0xFFFF0000;
|
return 0xFFFF0000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue