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

Commit 4362b01d authored by Shuo Qian's avatar Shuo Qian Committed by android-build-merger
Browse files

Merge "Modify the deprecation of PhoneNumberUtil isEmergencyNumber"

am: b8c7afac

Change-Id: I5a41e63ee113447f75178bf3bfd996431046799a
parents 1b7fb8f7 b8c7afac
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;
    }

    /**