am ef3a4564: [QRP1] Fix a bug where the wrong value would get passed

* commit 'ef3a45643e950cdd934763c59963cee4089f93e1':
  [QRP1] Fix a bug where the wrong value would get passed
main
Jean Chalard 2014-02-25 00:18:41 -08:00 committed by Android Git Automerger
commit 553dd86c19
1 changed files with 3 additions and 3 deletions

View File

@ -242,8 +242,8 @@ final class SuggestionStripLayoutHelper {
return indexInSuggestedWords; return indexInSuggestedWords;
} }
private int getSuggestionTextColor(final int indexInSuggestedWords, private int getSuggestionTextColor(final SuggestedWords suggestedWords,
final SuggestedWords suggestedWords) { final int indexInSuggestedWords) {
final int positionInStrip = final int positionInStrip =
getPositionInSuggestionStrip(indexInSuggestedWords, suggestedWords); getPositionInSuggestionStrip(indexInSuggestedWords, suggestedWords);
// TODO: Need to revisit this logic with bigram suggestions // TODO: Need to revisit this logic with bigram suggestions
@ -438,7 +438,7 @@ final class SuggestionStripLayoutHelper {
// {@link SuggestionStripView#onClick(View)}. // {@link SuggestionStripView#onClick(View)}.
wordView.setTag(indexInSuggestedWords); wordView.setTag(indexInSuggestedWords);
wordView.setText(getStyledSuggestedWord(suggestedWords, indexInSuggestedWords)); wordView.setText(getStyledSuggestedWord(suggestedWords, indexInSuggestedWords));
wordView.setTextColor(getSuggestionTextColor(positionInStrip, suggestedWords)); wordView.setTextColor(getSuggestionTextColor(suggestedWords, indexInSuggestedWords));
if (SuggestionStripView.DBG) { if (SuggestionStripView.DBG) {
mDebugInfoViews.get(positionInStrip).setText( mDebugInfoViews.get(positionInStrip).setText(
suggestedWords.getDebugString(indexInSuggestedWords)); suggestedWords.getDebugString(indexInSuggestedWords));