diff options
author | 2012-03-05 14:19:35 +0900 | |
---|---|---|
committer | 2012-03-05 14:19:35 +0900 | |
commit | 9b01890254c62a30b079bd9f79a30f9541faf11b (patch) | |
tree | df52be0af8d5aaade5a85971e0d825c9b48a8ef1 /java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java | |
parent | f1a559c51665cffe73a1f998cf436156bbe83802 (diff) | |
download | latinime-9b01890254c62a30b079bd9f79a30f9541faf11b.tar.gz latinime-9b01890254c62a30b079bd9f79a30f9541faf11b.tar.xz latinime-9b01890254c62a30b079bd9f79a30f9541faf11b.zip |
Move a method to a more sensical place.
Change-Id: I11f87448f689cf828bff960ad7a3e4739a3457dc
Diffstat (limited to 'java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java index 9ab8c01e6..e5638ef21 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java @@ -62,7 +62,6 @@ import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.StaticInnerHandlerWrapper; import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; -import com.android.inputmethod.latin.Utils; import java.util.ArrayList; import java.util.List; @@ -261,7 +260,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, private CharSequence getStyledSuggestionWord(SuggestedWords suggestions, int pos) { final CharSequence word = suggestions.getWord(pos); - final boolean isAutoCorrect = pos == 1 && Utils.willAutoCorrect(suggestions); + final boolean isAutoCorrect = pos == 1 && suggestions.willAutoCorrect(); final boolean isTypedWordValid = pos == 0 && suggestions.mTypedWordValid; if (!isAutoCorrect && !isTypedWordValid) return word; @@ -282,7 +281,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, private int getWordPosition(int index, SuggestedWords suggestions) { // TODO: This works for 3 suggestions. Revisit this algorithm when there are 5 or more // suggestions. - final int centerPos = Utils.willAutoCorrect(suggestions) ? 1 : 0; + final int centerPos = suggestions.willAutoCorrect() ? 1 : 0; if (index == mCenterSuggestionIndex) { return centerPos; } else if (index == centerPos) { @@ -297,7 +296,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, final boolean isSuggested = (pos != 0); final int color; - if (index == mCenterSuggestionIndex && Utils.willAutoCorrect(suggestions)) { + if (index == mCenterSuggestionIndex && suggestions.willAutoCorrect()) { color = mColorAutoCorrect; } else if (index == mCenterSuggestionIndex && suggestions.mTypedWordValid) { color = mColorValidTypedWord; |