diff options
author | 2012-03-09 22:02:26 +0900 | |
---|---|---|
committer | 2012-03-09 22:10:25 +0900 | |
commit | 1a85b74adb850457272bb922d3ee1e8a7008faa3 (patch) | |
tree | f757d94c06d5da44492fccae9066e3a93d65c26c /java/src/com/android/inputmethod/latin/SuggestedWords.java | |
parent | 68823ae08e820f0951447ed12c1bd32a24333d2e (diff) | |
download | latinime-1a85b74adb850457272bb922d3ee1e8a7008faa3.tar.gz latinime-1a85b74adb850457272bb922d3ee1e8a7008faa3.tar.xz latinime-1a85b74adb850457272bb922d3ee1e8a7008faa3.zip |
Entirely remove safety net memory.
mHasAutoCorrectionCandidate now includes the fact that this
did not get caught by the safety net. This is more intuitive.
Change-Id: I6502bbf1ca64a0a6d64f55d723305cf78352a656
Diffstat (limited to 'java/src/com/android/inputmethod/latin/SuggestedWords.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/SuggestedWords.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index 059d6847b..9aa3ebcda 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -33,7 +33,6 @@ public class SuggestedWords { public final boolean mTypedWordValid; public final boolean mHasAutoCorrectionCandidate; public final boolean mIsPunctuationSuggestions; - private final boolean mShouldBlockAutoCorrectionBySafetyNet; private final List<SuggestedWordInfo> mSuggestedWordInfoList; SuggestedWords(List<CharSequence> words, boolean typedWordValid, @@ -46,9 +45,9 @@ public class SuggestedWords { mWords = Collections.emptyList(); } mTypedWordValid = typedWordValid; - mHasAutoCorrectionCandidate = hasAutoCorrectionCandidate; + mHasAutoCorrectionCandidate = hasAutoCorrectionCandidate + && !shouldBlockAutoCorrectionBySafetyNet; mIsPunctuationSuggestions = isPunctuationSuggestions; - mShouldBlockAutoCorrectionBySafetyNet = shouldBlockAutoCorrectionBySafetyNet; mSuggestedWordInfoList = suggestedWordInfoList; } @@ -65,13 +64,11 @@ public class SuggestedWords { } public boolean hasAutoCorrectionWord() { - return !mShouldBlockAutoCorrectionBySafetyNet - && mHasAutoCorrectionCandidate && size() > 1 && !mTypedWordValid; + return mHasAutoCorrectionCandidate && size() > 1 && !mTypedWordValid; } public boolean willAutoCorrect() { - return !mTypedWordValid && mHasAutoCorrectionCandidate - && !mShouldBlockAutoCorrectionBySafetyNet; + return !mTypedWordValid && mHasAutoCorrectionCandidate; } @Override @@ -81,7 +78,6 @@ public class SuggestedWords { + " mTypedWordValid=" + mTypedWordValid + " mHasAutoCorrectionCandidate=" + mHasAutoCorrectionCandidate + " mIsPunctuationSuggestions=" + mIsPunctuationSuggestions - + " mShouldBlockAutoCorrectionBySafetyNet=" + mShouldBlockAutoCorrectionBySafetyNet + " mWords=" + Arrays.toString(mWords.toArray()); } |