diff options
author | Jaikumar Ganesh <jaikumar@google.com> | 2009-11-13 11:01:25 -0800 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2009-11-13 11:01:25 -0800 |
commit | 4c05ba1fcc6abcf199fc82505465a97fc7de553d (patch) | |
tree | 838b18b4892db24e4c417bb41f72af9f0889811c /core/java | |
parent | 609bbf182e4b4f39b6be7ed01331887ca70ea4c1 (diff) | |
download | frameworks_base-4c05ba1fcc6abcf199fc82505465a97fc7de553d.zip frameworks_base-4c05ba1fcc6abcf199fc82505465a97fc7de553d.tar.gz frameworks_base-4c05ba1fcc6abcf199fc82505465a97fc7de553d.tar.bz2 |
Update VCardComposer getOwnerPhoneNumberVcard() to support empty vcard for 0.vcf
Add check in getOwnerPhoneNumberVcard(). If the incoming phonenumber is empty,
do not add "TEL" to vcard data.
Original Change by: Yue Lixin
DrNo: Eastham
Bug: 2247067
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/pim/vcard/VCardComposer.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/pim/vcard/VCardComposer.java b/core/java/android/pim/vcard/VCardComposer.java index f9dce25..7807595 100644 --- a/core/java/android/pim/vcard/VCardComposer.java +++ b/core/java/android/pim/vcard/VCardComposer.java @@ -414,8 +414,10 @@ public class VCardComposer { appendVCardLine(builder, VCARD_PROPERTY_FULL_NAME, phoneName, needCharset, false); appendVCardLine(builder, VCARD_PROPERTY_NAME, phoneName, needCharset, false); - String label = Integer.toString(phonetype); - appendVCardTelephoneLine(builder, phonetype, label, phoneNumber); + if (!TextUtils.isEmpty(phoneNumber)) { + String label = Integer.toString(phonetype); + appendVCardTelephoneLine(builder, phonetype, label, phoneNumber); + } appendVCardLine(builder, VCARD_PROPERTY_END, VCARD_DATA_VCARD); |