aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-02-25 15:49:34 +0900
committerJean Chalard <jchalard@google.com>2014-02-25 17:05:44 +0900
commitef3a45643e950cdd934763c59963cee4089f93e1 (patch)
tree79a04fd71943ce1d91f31fa09c96130a0ed10b56 /java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java
parentdeb5cedf811e6d605a4a2a934f4d0c75b880cede (diff)
downloadlatinime-ef3a45643e950cdd934763c59963cee4089f93e1.tar.gz
latinime-ef3a45643e950cdd934763c59963cee4089f93e1.tar.xz
latinime-ef3a45643e950cdd934763c59963cee4089f93e1.zip
[QRP1] Fix a bug where the wrong value would get passed
In the practice it works because this never tries to access inside the suggestion strip, and the worst that can happen is a wrong text color for a suggestion. But since the two colors that would be swapped are the same, nobody ever notices -- unless they are using the GingerBread theme. Change-Id: Ic8c70d8b3cdddf92946dfefbbc6d061572626c7a
Diffstat (limited to 'java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java')
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java
index 8ea712835..7a7464e1d 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java
@@ -242,8 +242,8 @@ final class SuggestionStripLayoutHelper {
return indexInSuggestedWords;
}
- private int getSuggestionTextColor(final int indexInSuggestedWords,
- final SuggestedWords suggestedWords) {
+ private int getSuggestionTextColor(final SuggestedWords suggestedWords,
+ final int indexInSuggestedWords) {
final int positionInStrip =
getPositionInSuggestionStrip(indexInSuggestedWords, suggestedWords);
// TODO: Need to revisit this logic with bigram suggestions
@@ -438,7 +438,7 @@ final class SuggestionStripLayoutHelper {
// {@link SuggestionStripView#onClick(View)}.
wordView.setTag(indexInSuggestedWords);
wordView.setText(getStyledSuggestedWord(suggestedWords, indexInSuggestedWords));
- wordView.setTextColor(getSuggestionTextColor(positionInStrip, suggestedWords));
+ wordView.setTextColor(getSuggestionTextColor(suggestedWords, indexInSuggestedWords));
if (SuggestionStripView.DBG) {
mDebugInfoViews.get(positionInStrip).setText(
suggestedWords.getDebugString(indexInSuggestedWords));