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

Commit b56ed3a4 authored by Santos Cordon's avatar Santos Cordon Committed by Android (Google) Code Review
Browse files

Merge "Protecting against NPE with null country detector." into klp-dev

parents 116c12ef 04dfb5ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1805,7 +1805,7 @@ public class PhoneNumberUtils
        String countryIso;
        String countryIso;
        CountryDetector detector = (CountryDetector) context.getSystemService(
        CountryDetector detector = (CountryDetector) context.getSystemService(
                Context.COUNTRY_DETECTOR);
                Context.COUNTRY_DETECTOR);
        if (detector != null) {
        if (detector != null && detector.detectCountry() != null) {
            countryIso = detector.detectCountry().getCountryIso();
            countryIso = detector.detectCountry().getCountryIso();
        } else {
        } else {
            Locale locale = context.getResources().getConfiguration().locale;
            Locale locale = context.getResources().getConfiguration().locale;