Loading core/java/android/pim/vcard/ContactStruct.java +111 −14 Original line number Diff line number Diff line Loading @@ -478,43 +478,147 @@ public class ContactStruct { mWebsiteList = websiteList; } // All getter methods should be used carefully, since they may change // in the future as of 2009-09-24, on which I cannot be sure this structure // is completely consolidated. // When we are sure we will no longer change them, we'll be happy to // make it complete public (withouth @hide tag) // // Also note that these getter methods should be used only after // all properties being pushed into this object. If not, incorrect // value will "be stored in the local cache and" be returned to you. /** * @hide only for testing. * @hide */ public String getFamilyName() { return mFamilyName; } /** * @hide */ public String getGivenName() { return mGivenName; } /** * @hide */ public String getMiddleName() { return mMiddleName; } /** * @hide */ public String getPrefix() { return mPrefix; } /** * @hide */ public String getSuffix() { return mSuffix; } /** * @hide */ public String getFullName() { return mFullName; } /** * @hide */ public String getPhoneticFamilyName() { return mPhoneticFamilyName; } /** * @hide */ public String getPhoneticGivenName() { return mPhoneticGivenName; } /** * @hide */ public String getPhoneticMiddleName() { return mPhoneticMiddleName; } /** * @hide */ public String getPhoneticFullName() { return mPhoneticFullName; } /** * @hide */ public final List<String> getNickNameList() { return mNickNameList; } /** * @hide */ public String getDisplayName() { if (mDisplayName == null) { constructDisplayName(); } return mDisplayName; } /** * @hide */ public String getBirthday() { return mBirthday; } /** * @hide */ public final List<PhotoData> getPhotoList() { return mPhotoList; } /** * @hide only for testing. * @hide */ public final List<String> getNotes() { return mNoteList; } /** * @hide only for testing. * @hide */ public final List<PhoneData> getPhoneList() { return mPhoneList; } /** * @hide only for testing. * @hide */ public final List<EmailData> getEmailList() { return mEmailList; } /** * @hide only for testing. * @hide */ public final List<PostalData> getPostalList() { return mPostalList; } /** * @hide only for testing. * @hide */ public final List<OrganizationData> getOrganizationList() { return mOrganizationList; Loading Loading @@ -939,13 +1043,6 @@ public class ContactStruct { } } public String getDisplayName() { if (mDisplayName == null) { constructDisplayName(); } return mDisplayName; } /** * Construct the display name. The constructed data must not be null. */ Loading core/java/android/pim/vcard/VCardComposer.java +7 −5 Original line number Diff line number Diff line Loading @@ -960,10 +960,12 @@ public class VCardComposer { .get(Phone.CONTENT_ITEM_TYPE); if (contentValuesList != null) { for (ContentValues contentValues : contentValuesList) { appendVCardTelephoneLine(builder, contentValues .getAsInteger(Phone.TYPE), contentValues .getAsString(Phone.LABEL), contentValues .getAsString(Phone.NUMBER)); Integer phoneType = contentValues.getAsInteger(Phone.TYPE); int phoneTypeAsPrimitive = (phoneType == null ? Phone.TYPE_HOME : phoneType); appendVCardTelephoneLine(builder, phoneTypeAsPrimitive, contentValues.getAsString(Phone.LABEL), contentValues.getAsString(Phone.NUMBER)); } } else if (mIsDoCoMo) { appendVCardTelephoneLine(builder, Phone.TYPE_HOME, "", ""); Loading Loading @@ -1090,7 +1092,7 @@ public class VCardComposer { private void appendBirthday(final StringBuilder builder, final Map<String, List<ContentValues>> contentValuesListMap) { List<ContentValues> contentValuesList = contentValuesListMap .get(Website.CONTENT_ITEM_TYPE); .get(Miscellaneous.CONTENT_ITEM_TYPE); if (contentValuesList != null && contentValuesList.size() > 0) { // Theoretically, there must be only one birthday for each vCard data and // we are afraid of some parse error occuring in some devices, so Loading Loading
core/java/android/pim/vcard/ContactStruct.java +111 −14 Original line number Diff line number Diff line Loading @@ -478,43 +478,147 @@ public class ContactStruct { mWebsiteList = websiteList; } // All getter methods should be used carefully, since they may change // in the future as of 2009-09-24, on which I cannot be sure this structure // is completely consolidated. // When we are sure we will no longer change them, we'll be happy to // make it complete public (withouth @hide tag) // // Also note that these getter methods should be used only after // all properties being pushed into this object. If not, incorrect // value will "be stored in the local cache and" be returned to you. /** * @hide only for testing. * @hide */ public String getFamilyName() { return mFamilyName; } /** * @hide */ public String getGivenName() { return mGivenName; } /** * @hide */ public String getMiddleName() { return mMiddleName; } /** * @hide */ public String getPrefix() { return mPrefix; } /** * @hide */ public String getSuffix() { return mSuffix; } /** * @hide */ public String getFullName() { return mFullName; } /** * @hide */ public String getPhoneticFamilyName() { return mPhoneticFamilyName; } /** * @hide */ public String getPhoneticGivenName() { return mPhoneticGivenName; } /** * @hide */ public String getPhoneticMiddleName() { return mPhoneticMiddleName; } /** * @hide */ public String getPhoneticFullName() { return mPhoneticFullName; } /** * @hide */ public final List<String> getNickNameList() { return mNickNameList; } /** * @hide */ public String getDisplayName() { if (mDisplayName == null) { constructDisplayName(); } return mDisplayName; } /** * @hide */ public String getBirthday() { return mBirthday; } /** * @hide */ public final List<PhotoData> getPhotoList() { return mPhotoList; } /** * @hide only for testing. * @hide */ public final List<String> getNotes() { return mNoteList; } /** * @hide only for testing. * @hide */ public final List<PhoneData> getPhoneList() { return mPhoneList; } /** * @hide only for testing. * @hide */ public final List<EmailData> getEmailList() { return mEmailList; } /** * @hide only for testing. * @hide */ public final List<PostalData> getPostalList() { return mPostalList; } /** * @hide only for testing. * @hide */ public final List<OrganizationData> getOrganizationList() { return mOrganizationList; Loading Loading @@ -939,13 +1043,6 @@ public class ContactStruct { } } public String getDisplayName() { if (mDisplayName == null) { constructDisplayName(); } return mDisplayName; } /** * Construct the display name. The constructed data must not be null. */ Loading
core/java/android/pim/vcard/VCardComposer.java +7 −5 Original line number Diff line number Diff line Loading @@ -960,10 +960,12 @@ public class VCardComposer { .get(Phone.CONTENT_ITEM_TYPE); if (contentValuesList != null) { for (ContentValues contentValues : contentValuesList) { appendVCardTelephoneLine(builder, contentValues .getAsInteger(Phone.TYPE), contentValues .getAsString(Phone.LABEL), contentValues .getAsString(Phone.NUMBER)); Integer phoneType = contentValues.getAsInteger(Phone.TYPE); int phoneTypeAsPrimitive = (phoneType == null ? Phone.TYPE_HOME : phoneType); appendVCardTelephoneLine(builder, phoneTypeAsPrimitive, contentValues.getAsString(Phone.LABEL), contentValues.getAsString(Phone.NUMBER)); } } else if (mIsDoCoMo) { appendVCardTelephoneLine(builder, Phone.TYPE_HOME, "", ""); Loading Loading @@ -1090,7 +1092,7 @@ public class VCardComposer { private void appendBirthday(final StringBuilder builder, final Map<String, List<ContentValues>> contentValuesListMap) { List<ContentValues> contentValuesList = contentValuesListMap .get(Website.CONTENT_ITEM_TYPE); .get(Miscellaneous.CONTENT_ITEM_TYPE); if (contentValuesList != null && contentValuesList.size() > 0) { // Theoretically, there must be only one birthday for each vCard data and // we are afraid of some parse error occuring in some devices, so Loading