summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael W <baddaemon87@gmail.com>2016-06-18 20:40:54 (GMT)
committerMichael W <baddaemon87@gmail.com>2016-06-18 20:40:54 (GMT)
commit8b534bef9b5117b6e6cddd554e9fa2891ad61ffa (patch)
tree22421bfa53791a8b1000bbbe72ab628431ca6e27
parentadf2dcbccb676ed134e8aa36d5e3f79c350ac436 (diff)
downloadandroid_packages_apps_Eleven-8b534bef9b5117b6e6cddd554e9fa2891ad61ffa.zip
android_packages_apps_Eleven-8b534bef9b5117b6e6cddd554e9fa2891ad61ffa.tar.gz
android_packages_apps_Eleven-8b534bef9b5117b6e6cddd554e9fa2891ad61ffa.tar.bz2
Eleven: fix possible NPE
Fix for the case when name is null Change-Id: I90909497129c09f6ab8a4eebd0935c2d38de5b39 Reference: BugDump 13-20160610-16 L#80
-rw-r--r--src/com/cyanogenmod/eleven/locale/LocaleUtils.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/eleven/locale/LocaleUtils.java b/src/com/cyanogenmod/eleven/locale/LocaleUtils.java
index f16a17a..4381f71 100644
--- a/src/com/cyanogenmod/eleven/locale/LocaleUtils.java
+++ b/src/com/cyanogenmod/eleven/locale/LocaleUtils.java
@@ -127,6 +127,9 @@ public class LocaleUtils {
* for the new # bucket, so the returned range becomes 0 to N+1.
*/
public int getBucketIndex(String name) {
+ if (name == null) {
+ return -1;
+ }
boolean prefixIsNumeric = false;
final int length = name.length();
int offset = 0;