aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2013-09-24 21:08:45 +0900
committerSatoshi Kataoka <satok@google.com>2013-09-24 21:14:48 +0900
commitd1ae03046c1b502117129831286ed4ea0828740f (patch)
treeba951d6aee573f4e412c3f2b3ecbe9246e6b00ff /java/src
parentf068c6e656fae4516b6ac09b4e9cb8a7371a14c7 (diff)
downloadlatinime-d1ae03046c1b502117129831286ed4ea0828740f.tar.gz
latinime-d1ae03046c1b502117129831286ed4ea0828740f.tar.xz
latinime-d1ae03046c1b502117129831286ed4ea0828740f.zip
Fix OOBE in JB backword
Bug: 10905948 Change-Id: I4e953296ce3067d05fc5759375f40513580484a6
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/EmojiKeyboardView.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/EmojiKeyboardView.java b/java/src/com/android/inputmethod/keyboard/EmojiKeyboardView.java
index 0b3052e09..4e61edac2 100644
--- a/java/src/com/android/inputmethod/keyboard/EmojiKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/EmojiKeyboardView.java
@@ -206,7 +206,14 @@ public final class EmojiKeyboardView extends LinearLayout implements OnTabChange
}
public int getCategoryPageSize(int categoryId) {
- return mShownCategories.get(categoryId).mPageCount;
+ for (final CategoryProperties prop : mShownCategories) {
+ if (prop.mCategoryId == categoryId) {
+ return prop.mPageCount;
+ }
+ }
+ Log.w(TAG, "Invalid category id: " + categoryId);
+ // Should not reach here.
+ return 0;
}
public void setCurrentCategoryId(int categoryId) {