diff options
author | Jaikumar Ganesh <jaikumar@google.com> | 2009-11-13 13:08:52 -0800 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2009-11-13 13:08:52 -0800 |
commit | f05ec9237ec907be3f2c581a950149435bd585fb (patch) | |
tree | 0800fb35cabb4e21d9ffbcdfdbe6e377e1c0e812 /core/java | |
parent | 94140b35541b955589f878ce6b26b65c3b3e18ac (diff) | |
download | frameworks_base-f05ec9237ec907be3f2c581a950149435bd585fb.zip frameworks_base-f05ec9237ec907be3f2c581a950149435bd585fb.tar.gz frameworks_base-f05ec9237ec907be3f2c581a950149435bd585fb.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.
Manual merge from eclair branch
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 b7ad7df..bbd19fb 100644 --- a/core/java/android/pim/vcard/VCardComposer.java +++ b/core/java/android/pim/vcard/VCardComposer.java @@ -2378,8 +2378,10 @@ public class VCardComposer { appendVCardLine(builder, Constants.PROPERTY_FN, phoneName, needCharset, false); appendVCardLine(builder, Constants.PROPERTY_N, phoneName, needCharset, false); - String label = Integer.toString(phonetype); - appendVCardTelephoneLine(builder, phonetype, label, phoneNumber, false); + if (!TextUtils.isEmpty(phoneNumber)) { + String label = Integer.toString(phonetype); + appendVCardTelephoneLine(builder, phonetype, label, phoneNumber, false); + } appendVCardLine(builder, Constants.PROPERTY_END, VCARD_DATA_VCARD); |