diff options
author | Andrew Lee <anwlee@google.com> | 2014-05-14 21:44:38 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-14 21:44:39 +0000 |
commit | 4268b243ded3b58c463c4f78219686ab0bf06ce6 (patch) | |
tree | e1013545ac0318fb063744d2364005b714e97c33 /telephony | |
parent | f8c940733ed0aaa95a66cb80181f08e39e4592fa (diff) | |
parent | b31c310fcf9739729ef2e64eaf49ce2e86a8a058 (diff) | |
download | frameworks_base-4268b243ded3b58c463c4f78219686ab0bf06ce6.zip frameworks_base-4268b243ded3b58c463c4f78219686ab0bf06ce6.tar.gz frameworks_base-4268b243ded3b58c463c4f78219686ab0bf06ce6.tar.bz2 |
Merge "Handle normalization of a "null" phone number."
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/PhoneNumberUtils.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java index c79e9bf..9da032a 100644 --- a/telephony/java/android/telephony/PhoneNumberUtils.java +++ b/telephony/java/android/telephony/PhoneNumberUtils.java @@ -1492,6 +1492,10 @@ public class PhoneNumberUtils * @return the normalized number. */ public static String normalizeNumber(String phoneNumber) { + if (TextUtils.isEmpty(phoneNumber)) { + return ""; + } + StringBuilder sb = new StringBuilder(); int len = phoneNumber.length(); for (int i = 0; i < len; i++) { |