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

Commit b8c7afac authored by Shuo Qian's avatar Shuo Qian Committed by Gerrit Code Review
Browse files

Merge "Modify the deprecation of PhoneNumberUtil isEmergencyNumber"

parents dc489aba 93711932
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;
    }

    /**