Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c8fd973 authored by tom hsu's avatar tom hsu Committed by Tom Hsu
Browse files

Hanlde NPE when context from default phone is null.

Bug: 253630907
Test: Maunal test
Test: atest pass
Change-Id: I577a78d70428e8f438e02115586e5de49d415019
parent 02493c97
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -100,6 +100,9 @@ public class LocalePicker extends ListFragment {
    }

    public static String[] getSupportedLocales(Context context) {
        if (context == null) {
            return new String[0];
        }
        String[] allLocales = context.getResources().getStringArray(R.array.supported_locales);

        Predicate<String> localeFilter = getLocaleFilter();