Merge "Fix an OOB"

main
Jean Chalard 2012-03-12 01:12:40 -07:00 committed by Android (Google) Code Review
commit a3f2ce1f31
1 changed files with 1 additions and 1 deletions

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