From f1967ce322a09456035ac56877dc4414250c43a9 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 2 Mar 2012 02:49:24 -0800 Subject: [PATCH] Revert "Make a member read-only" This reverts commit 6a43e39bf077bcb706be5e5a84056a3f62580ad7 --- java/src/com/android/inputmethod/latin/SuggestedWords.java | 6 +----- java/src/com/android/inputmethod/latin/Utils.java | 2 +- .../inputmethod/latin/suggestions/SuggestionsView.java | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index 549628ef0..ed6359cfa 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -29,7 +29,7 @@ public class SuggestedWords { public final List mWords; public final boolean mTypedWordValid; - private final boolean mHasAutoCorrectionCandidate; + public final boolean mHasAutoCorrectionCandidate; public final boolean mIsPunctuationSuggestions; private final List mSuggestedWordInfoList; private boolean mShouldBlockAutoCorrection; @@ -69,10 +69,6 @@ public class SuggestedWords { return mHasAutoCorrectionCandidate && ((size() > 1 && !mTypedWordValid) || mTypedWordValid); } - public boolean hasAutoCorrectionCandidate() { - return mHasAutoCorrectionCandidate; - } - public boolean isPunctuationSuggestions() { return mIsPunctuationSuggestions; } diff --git a/java/src/com/android/inputmethod/latin/Utils.java b/java/src/com/android/inputmethod/latin/Utils.java index cd2f95180..47ea9ee8a 100644 --- a/java/src/com/android/inputmethod/latin/Utils.java +++ b/java/src/com/android/inputmethod/latin/Utils.java @@ -775,7 +775,7 @@ public class Utils { } public static boolean willAutoCorrect(SuggestedWords suggestions) { - return !suggestions.mTypedWordValid && suggestions.hasAutoCorrectionCandidate() + return !suggestions.mTypedWordValid && suggestions.mHasAutoCorrectionCandidate && !suggestions.shouldBlockAutoCorrection(); } diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java index 312e29abd..40d782640 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java @@ -307,7 +307,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, color = mColorTypedWord; } if (LatinImeLogger.sDBG) { - if (index == mCenterSuggestionIndex && suggestions.hasAutoCorrectionCandidate() + if (index == mCenterSuggestionIndex && suggestions.mHasAutoCorrectionCandidate && suggestions.shouldBlockAutoCorrection()) { return 0xFFFF0000; }