Make the safety net memory private
Change-Id: I10959d47c980d2e8f2ea995955acf02193e3ff7bmain
parent
ebbb7e9665
commit
68823ae08e
|
@ -1845,8 +1845,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
|||
public void showSuggestions(final SuggestedWords suggestedWords, final CharSequence typedWord) {
|
||||
final CharSequence autoCorrection;
|
||||
if (suggestedWords.size() > 0) {
|
||||
if (!suggestedWords.mShouldBlockAutoCorrectionBySafetyNet
|
||||
&& suggestedWords.hasAutoCorrectionWord()) {
|
||||
if (suggestedWords.hasAutoCorrectionWord()) {
|
||||
autoCorrection = suggestedWords.getWord(1);
|
||||
} else {
|
||||
autoCorrection = typedWord;
|
||||
|
|
|
@ -33,7 +33,7 @@ public class SuggestedWords {
|
|||
public final boolean mTypedWordValid;
|
||||
public final boolean mHasAutoCorrectionCandidate;
|
||||
public final boolean mIsPunctuationSuggestions;
|
||||
public final boolean mShouldBlockAutoCorrectionBySafetyNet;
|
||||
private final boolean mShouldBlockAutoCorrectionBySafetyNet;
|
||||
private final List<SuggestedWordInfo> mSuggestedWordInfoList;
|
||||
|
||||
SuggestedWords(List<CharSequence> words, boolean typedWordValid,
|
||||
|
@ -65,7 +65,8 @@ public class SuggestedWords {
|
|||
}
|
||||
|
||||
public boolean hasAutoCorrectionWord() {
|
||||
return mHasAutoCorrectionCandidate && size() > 1 && !mTypedWordValid;
|
||||
return !mShouldBlockAutoCorrectionBySafetyNet
|
||||
&& mHasAutoCorrectionCandidate && size() > 1 && !mTypedWordValid;
|
||||
}
|
||||
|
||||
public boolean willAutoCorrect() {
|
||||
|
|
Loading…
Reference in New Issue