Merge "Fix an OOB"

This commit is contained in:
Jean Chalard 2012-03-12 01:12:40 -07:00 committed by Android (Google) Code Review
commit a3f2ce1f31

View file

@ -329,7 +329,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
} else {
color = mColorTypedWord;
}
if (LatinImeLogger.sDBG) {
if (LatinImeLogger.sDBG && suggestedWords.size() > 1) {
// If we auto-correct, then the autocorrection is in slot 0 and the typed word
// is in slot 1.
if (index == mCenterSuggestionIndex && suggestedWords.mHasAutoCorrectionCandidate