Fix NPE in Key.isDigitPopupCharacter (DO NOT MERGE)

This is the cherry-pick Ie6e8d31e41010db27e2db415b577458b73a9f1a2

Bug: 4442045
Change-Id: I004b15858d3d69b336c66accd0e078f0eaec0a9a
This commit is contained in:
Tadashi G. Takaoka 2011-05-19 14:32:33 +09:00
parent 3f72d81388
commit a4944dffa9

View file

@ -267,7 +267,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) {