From 5cbdb23621bb8064ff9f85878e3bbd4260d16730 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 13 Jul 2011 12:26:40 -0700 Subject: [PATCH] Fix IOOB Exception Bug: 5021745 Change-Id: I58815ca3f3c8b1bead895e8a94e2f89dbcc67436 --- java/src/com/android/inputmethod/latin/CandidateView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/java/src/com/android/inputmethod/latin/CandidateView.java b/java/src/com/android/inputmethod/latin/CandidateView.java index 565b01d5a..54c430373 100644 --- a/java/src/com/android/inputmethod/latin/CandidateView.java +++ b/java/src/com/android/inputmethod/latin/CandidateView.java @@ -193,6 +193,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo public void layoutStrip(SuggestedWords suggestions, int maxWidth, int maxCount) { final int size = suggestions.size(); + if (size == 0) return; setupTexts(suggestions, size, mAutoCorrectHighlight); mCountInStrip = Math.min(maxCount, size); mScaleX = 1.0f;