diff options
| -rw-r--r-- | config/hiddenapi-greylist.txt | 4 | ||||
| -rw-r--r-- | telephony/java/android/telephony/PhoneNumberUtils.java | 96 | ||||
| -rw-r--r-- | telephony/java/com/android/internal/telephony/RILConstants.java | 1 |
3 files changed, 1 insertions, 100 deletions
diff --git a/config/hiddenapi-greylist.txt b/config/hiddenapi-greylist.txt index 648ff274f37c..ddfb7a9a4546 100644 --- a/config/hiddenapi-greylist.txt +++ b/config/hiddenapi-greylist.txt @@ -2807,8 +2807,6 @@ Lcom/android/internal/telephony/CommandsInterface;->acknowledgeLastIncomingGsmSm Lcom/android/internal/telephony/CommandsInterface;->changeBarringPassword(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/os/Message;)V Lcom/android/internal/telephony/CommandsInterface;->deleteSmsOnRuim(ILandroid/os/Message;)V Lcom/android/internal/telephony/CommandsInterface;->deleteSmsOnSim(ILandroid/os/Message;)V -Lcom/android/internal/telephony/CommandsInterface;->dial(Ljava/lang/String;ILandroid/os/Message;)V -Lcom/android/internal/telephony/CommandsInterface;->dial(Ljava/lang/String;ILcom/android/internal/telephony/UUSInfo;Landroid/os/Message;)V Lcom/android/internal/telephony/CommandsInterface;->exitEmergencyCallbackMode(Landroid/os/Message;)V Lcom/android/internal/telephony/CommandsInterface;->getBasebandVersion(Landroid/os/Message;)V Lcom/android/internal/telephony/CommandsInterface;->getCdmaBroadcastConfig(Landroid/os/Message;)V @@ -3820,8 +3818,6 @@ Lcom/android/internal/telephony/TelephonyCapabilities;->supportsAdn(I)Z Lcom/android/internal/telephony/TelephonyProperties;->PROPERTY_ICC_OPERATOR_NUMERIC:Ljava/lang/String; Lcom/android/internal/telephony/test/InterpreterEx;-><init>(Ljava/lang/String;)V Lcom/android/internal/telephony/test/SimulatedCommands;->acceptCall(Landroid/os/Message;)V -Lcom/android/internal/telephony/test/SimulatedCommands;->dial(Ljava/lang/String;ILandroid/os/Message;)V -Lcom/android/internal/telephony/test/SimulatedCommands;->dial(Ljava/lang/String;ILcom/android/internal/telephony/UUSInfo;Landroid/os/Message;)V Lcom/android/internal/telephony/test/SimulatedCommands;->mDcSuccess:Z Lcom/android/internal/telephony/test/SimulatedCommands;->resultFail(Landroid/os/Message;Ljava/lang/Object;Ljava/lang/Throwable;)V Lcom/android/internal/telephony/test/SimulatedCommands;->resultSuccess(Landroid/os/Message;Ljava/lang/Object;)V diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java index c95837e1e1de..4dcb410e277a 100644 --- a/telephony/java/android/telephony/PhoneNumberUtils.java +++ b/telephony/java/android/telephony/PhoneNumberUtils.java @@ -20,7 +20,6 @@ import com.android.i18n.phonenumbers.NumberParseException; import com.android.i18n.phonenumbers.PhoneNumberUtil; import com.android.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat; import com.android.i18n.phonenumbers.Phonenumber.PhoneNumber; -import com.android.i18n.phonenumbers.ShortNumberInfo; import android.annotation.IntDef; import android.annotation.UnsupportedAppUsage; @@ -2185,101 +2184,6 @@ public class PhoneNumberUtils { } /** - * Back-up old logics for {@link #isEmergencyNumberInternal} for legacy and deprecate purpose. - * - * @hide - */ - public static boolean isEmergencyNumberInternal(String number, boolean useExactMatch, - String defaultCountryIso) { - // If the number passed in is null, just return false: - if (number == null) return false; - - // If the number passed in is a SIP address, return false, since the - // concept of "emergency numbers" is only meaningful for calls placed - // over the cell network. - // (Be sure to do this check *before* calling extractNetworkPortionAlt(), - // since the whole point of extractNetworkPortionAlt() is to filter out - // any non-dialable characters (which would turn 'abc911def@example.com' - // into '911', for example.)) - if (PhoneNumberUtils.isUriNumber(number)) { - return false; - } - - // Strip the separators from the number before comparing it - // to the list. - number = PhoneNumberUtils.extractNetworkPortionAlt(number); - - String emergencyNumbers = ""; - int slotId = SubscriptionManager.getSlotIndex(getDefaultVoiceSubId()); - - // retrieve the list of emergency numbers - // check read-write ecclist property first - String ecclist = (slotId <= 0) ? "ril.ecclist" : ("ril.ecclist" + slotId); - - emergencyNumbers = SystemProperties.get(ecclist, ""); - - Rlog.d(LOG_TAG, "slotId:" + slotId + " country:" - + defaultCountryIso + " emergencyNumbers: " + emergencyNumbers); - - if (TextUtils.isEmpty(emergencyNumbers)) { - // then read-only ecclist property since old RIL only uses this - emergencyNumbers = SystemProperties.get("ro.ril.ecclist"); - } - - if (!TextUtils.isEmpty(emergencyNumbers)) { - // searches through the comma-separated list for a match, - // return true if one is found. - for (String emergencyNum : emergencyNumbers.split(",")) { - // It is not possible to append additional digits to an emergency number to dial - // the number in Brazil - it won't connect. - if (useExactMatch || "BR".equalsIgnoreCase(defaultCountryIso)) { - if (number.equals(emergencyNum)) { - return true; - } - } else { - if (number.startsWith(emergencyNum)) { - return true; - } - } - } - // no matches found against the list! - return false; - } - - Rlog.d(LOG_TAG, "System property doesn't provide any emergency numbers." - + " Use embedded logic for determining ones."); - - // If slot id is invalid, means that there is no sim card. - // According spec 3GPP TS22.101, the following numbers should be - // ECC numbers when SIM/USIM is not present. - emergencyNumbers = ((slotId < 0) ? "112,911,000,08,110,118,119,999" : "112,911"); - - for (String emergencyNum : emergencyNumbers.split(",")) { - if (useExactMatch) { - if (number.equals(emergencyNum)) { - return true; - } - } else { - if (number.startsWith(emergencyNum)) { - return true; - } - } - } - - // No ecclist system property, so use our own list. - if (defaultCountryIso != null) { - ShortNumberInfo info = ShortNumberInfo.getInstance(); - if (useExactMatch) { - return info.isEmergencyNumber(number, defaultCountryIso); - } else { - return info.connectsToEmergencyNumber(number, defaultCountryIso); - } - } - - return false; - } - - /** * isVoiceMailNumber: checks a given number against the voicemail * number provided by the RIL and SIM card. The caller must have * the READ_PHONE_STATE credential. diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java index c9343171e03e..2ebe87067be3 100644 --- a/telephony/java/com/android/internal/telephony/RILConstants.java +++ b/telephony/java/com/android/internal/telephony/RILConstants.java @@ -421,6 +421,7 @@ public interface RILConstants { int RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA = 202; int RIL_REQUEST_SET_LINK_CAPACITY_REPORTING_CRITERIA = 203; int RIL_REQUEST_SET_PREFERRED_DATA_MODEM = 204; + int RIL_REQUEST_EMERGENCY_DIAL = 205; /* Responses begin */ int RIL_RESPONSE_ACKNOWLEDGEMENT = 800; |