diff options
author | David Brown <dab@google.com> | 2011-11-17 15:12:54 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-17 15:12:54 -0800 |
commit | 85a80ba8cd92fd0a7f7e4a899e772b0f6a50a9d7 (patch) | |
tree | b7bb45f3db5c8e049415c1b30b6e5348da7b0419 /telephony | |
parent | c5b057f42372e7a3b0560afe88a243378255c2e2 (diff) | |
parent | 19a57bdedf3f9ccfa4d45cd35ef4b379853c6a81 (diff) | |
download | frameworks_base-85a80ba8cd92fd0a7f7e4a899e772b0f6a50a9d7.zip frameworks_base-85a80ba8cd92fd0a7f7e4a899e772b0f6a50a9d7.tar.gz frameworks_base-85a80ba8cd92fd0a7f7e4a899e772b0f6a50a9d7.tar.bz2 |
am 19a57bde: am 1733a3de: Merge "SIP addresses containing "911" shouldn\'t be considered emergency calls" into ics-mr1
* commit '19a57bdedf3f9ccfa4d45cd35ef4b379853c6a81':
SIP addresses containing "911" shouldn't be considered emergency calls
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/PhoneNumberUtils.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java index f2ccb5b..56a0a2c 100644 --- a/telephony/java/android/telephony/PhoneNumberUtils.java +++ b/telephony/java/android/telephony/PhoneNumberUtils.java @@ -1575,6 +1575,17 @@ public class PhoneNumberUtils // 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 (isUriNumber(number)) { + return false; + } + // Strip the separators from the number before comparing it // to the list. number = extractNetworkPortionAlt(number); |