summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhisek Devkota <ciwrl@cyanogenmod.com>2016-07-27 17:19:04 (GMT)
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-07-27 17:19:04 (GMT)
commita6f204a76ba5336d2e651fcb608b79cc1826c64d (patch)
tree71e3ec267833786fc0c5edcaac1dd2e36e8de887
parent16c100d1a9709438ecdd7a08afa392b8fd75aad3 (diff)
parent8b534bef9b5117b6e6cddd554e9fa2891ad61ffa (diff)
downloadandroid_packages_apps_Eleven-a6f204a76ba5336d2e651fcb608b79cc1826c64d.zip
android_packages_apps_Eleven-a6f204a76ba5336d2e651fcb608b79cc1826c64d.tar.gz
android_packages_apps_Eleven-a6f204a76ba5336d2e651fcb608b79cc1826c64d.tar.bz2
Merge "Eleven: fix possible NPE" into cm-13.0
-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;