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

Commit febec932 authored by Santos Cordon's avatar Santos Cordon Committed by Android Git Automerger
Browse files

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

* commit 'b56ed3a4':
  Protecting against NPE with null country detector.
parents b27239b4 b56ed3a4
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;