diff options
author | Andrew Lee <anwlee@google.com> | 2014-05-14 12:13:02 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-05-14 13:00:28 -0700 |
commit | b31c310fcf9739729ef2e64eaf49ce2e86a8a058 (patch) | |
tree | ae1ab92657679ad0b4b1db7cecc8524684b4ff0b /telephony | |
parent | bee74c2b479153bb6a4b9e03f068658042a5fdfc (diff) | |
download | frameworks_base-b31c310fcf9739729ef2e64eaf49ce2e86a8a058.zip frameworks_base-b31c310fcf9739729ef2e64eaf49ce2e86a8a058.tar.gz frameworks_base-b31c310fcf9739729ef2e64eaf49ce2e86a8a058.tar.bz2 |
Handle normalization of a "null" phone number.
Bug: 14900155
Change-Id: I1c4c5c6dec4c4c470b436102c72a7476d3d5237c
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++) { |