diff options
author | Peng Zhu <w46254@motorola.com> | 2009-09-24 15:34:53 -0400 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2009-09-24 18:02:37 -0700 |
commit | 694bd8bf733aee372705e00d13964a20e5b16209 (patch) | |
tree | 1ce2cc657c01f8fc46d6887160f06842ac3f8773 /telephony/java | |
parent | b87f24a6a88a994256ca97b69904af28824bc9ce (diff) | |
download | frameworks_base-694bd8bf733aee372705e00d13964a20e5b16209.zip frameworks_base-694bd8bf733aee372705e00d13964a20e5b16209.tar.gz frameworks_base-694bd8bf733aee372705e00d13964a20e5b16209.tar.bz2 |
Add null check at isEmergencyNumber().
Change-Id: I7eca1ba1ce42e02c7506a7d969e4865778bb49cc
Diffstat (limited to 'telephony/java')
-rw-r--r-- | telephony/java/android/telephony/PhoneNumberUtils.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java index 046bfea..3265708 100644 --- a/telephony/java/android/telephony/PhoneNumberUtils.java +++ b/telephony/java/android/telephony/PhoneNumberUtils.java @@ -1230,6 +1230,9 @@ public class PhoneNumberUtils * listed in the ril / sim, then return true, otherwise false. */ public static boolean isEmergencyNumber(String number) { + // If the number passed in is null, just return false: + if (number == null) return false; + // Strip the separators from the number before comparing it // to the list. number = extractNetworkPortion(number); |