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

Commit 04dfb5ec authored by Santos Cordon's avatar Santos Cordon
Browse files

Protecting against NPE with null country detector.

bug:10514454
Change-Id: I316c47eddbe4929599866a3f9da9129d0056e3e2
parent 94366313
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1805,7 +1805,7 @@ public class PhoneNumberUtils
        String countryIso;
        CountryDetector detector = (CountryDetector) context.getSystemService(
                Context.COUNTRY_DETECTOR);
        if (detector != null) {
        if (detector != null && detector.detectCountry() != null) {
            countryIso = detector.detectCountry().getCountryIso();
        } else {
            Locale locale = context.getResources().getConfiguration().locale;