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

Commit 4a2b4a23 authored by Shuo Qian's avatar Shuo Qian Committed by Android (Google) Code Review
Browse files

Merge "Modify the deprecation of PhoneNumberUtil isEmergencyNumber"

parents 5d597226 c6d55453
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;
    }

    /**