Merge "Fix IOOB Exception"

This commit is contained in:
Tadashi G. Takaoka 2011-07-13 16:06:10 -07:00 committed by Android (Google) Code Review
commit 6a6aad0758

View file

@ -193,6 +193,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
public void layoutStrip(SuggestedWords suggestions, int maxWidth, int maxCount) { public void layoutStrip(SuggestedWords suggestions, int maxWidth, int maxCount) {
final int size = suggestions.size(); final int size = suggestions.size();
if (size == 0) return;
setupTexts(suggestions, size, mAutoCorrectHighlight); setupTexts(suggestions, size, mAutoCorrectHighlight);
mCountInStrip = Math.min(maxCount, size); mCountInStrip = Math.min(maxCount, size);
mScaleX = 1.0f; mScaleX = 1.0f;