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

Commit 47fdabe9 authored by Shuo Qian's avatar Shuo Qian Committed by android-build-merger
Browse files

Merge "Modify the deprecation of PhoneNumberUtil isEmergencyNumber" am: b8c7afac

am: 4362b01d

Change-Id: I74e90fc150b6928e244a35aabeb865b6ad521810
parents cb660519 4362b01d
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2016,7 +2016,16 @@ public class PhoneNumberUtils {
    private static boolean isEmergencyNumberInternal(int subId, String number,
                                                     String defaultCountryIso,
                                                     boolean useExactMatch) {
        try {
            if (useExactMatch) {
                return TelephonyManager.getDefault().isEmergencyNumber(number);
            } else {
                return TelephonyManager.getDefault().isPotentialEmergencyNumber(number);
            }
        } catch (RuntimeException ex) {
            Rlog.e(LOG_TAG, "isEmergencyNumberInternal: RuntimeException: " + ex);
        }
        return false;
    }

    /**