From 96f185d8af58137d55fc65110f48914221bb78f5 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Thu, 19 May 2011 14:32:33 +0900 Subject: [PATCH] Fix NPE in Key.isDigitPopupCharacter Change-Id: Ie6e8d31e41010db27e2db415b577458b73a9f1a2 --- java/src/com/android/inputmethod/keyboard/Key.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java index 33b55b5d3..4b4ffdbaf 100644 --- a/java/src/com/android/inputmethod/keyboard/Key.java +++ b/java/src/com/android/inputmethod/keyboard/Key.java @@ -275,7 +275,7 @@ public class Key { } private static boolean isDigitPopupCharacter(CharSequence label) { - return label.length() == 1 && Character.isDigit(label.charAt(0)); + return label != null && label.length() == 1 && Character.isDigit(label.charAt(0)); } private static CharSequence[] filterOutDigitPopupCharacters(CharSequence[] popupCharacters) {