am b55e60e1: Fix vCard code.
Merge commit 'b55e60e1d88c02078c3d6bc0f408fb0065a1e93c' into eclair-plus-aosp * commit 'b55e60e1d88c02078c3d6bc0f408fb0065a1e93c': Fix vCard code.
This commit is contained in:
@@ -478,43 +478,147 @@ public class ContactStruct {
|
|||||||
mWebsiteList = websiteList;
|
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() {
|
public final List<PhotoData> getPhotoList() {
|
||||||
return mPhotoList;
|
return mPhotoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hide only for testing.
|
* @hide
|
||||||
*/
|
*/
|
||||||
public final List<String> getNotes() {
|
public final List<String> getNotes() {
|
||||||
return mNoteList;
|
return mNoteList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hide only for testing.
|
* @hide
|
||||||
*/
|
*/
|
||||||
public final List<PhoneData> getPhoneList() {
|
public final List<PhoneData> getPhoneList() {
|
||||||
return mPhoneList;
|
return mPhoneList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hide only for testing.
|
* @hide
|
||||||
*/
|
*/
|
||||||
public final List<EmailData> getEmailList() {
|
public final List<EmailData> getEmailList() {
|
||||||
return mEmailList;
|
return mEmailList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hide only for testing.
|
* @hide
|
||||||
*/
|
*/
|
||||||
public final List<PostalData> getPostalList() {
|
public final List<PostalData> getPostalList() {
|
||||||
return mPostalList;
|
return mPostalList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hide only for testing.
|
* @hide
|
||||||
*/
|
*/
|
||||||
public final List<OrganizationData> getOrganizationList() {
|
public final List<OrganizationData> getOrganizationList() {
|
||||||
return mOrganizationList;
|
return mOrganizationList;
|
||||||
@@ -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.
|
* Construct the display name. The constructed data must not be null.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -960,10 +960,12 @@ public class VCardComposer {
|
|||||||
.get(Phone.CONTENT_ITEM_TYPE);
|
.get(Phone.CONTENT_ITEM_TYPE);
|
||||||
if (contentValuesList != null) {
|
if (contentValuesList != null) {
|
||||||
for (ContentValues contentValues : contentValuesList) {
|
for (ContentValues contentValues : contentValuesList) {
|
||||||
appendVCardTelephoneLine(builder, contentValues
|
Integer phoneType = contentValues.getAsInteger(Phone.TYPE);
|
||||||
.getAsInteger(Phone.TYPE), contentValues
|
int phoneTypeAsPrimitive =
|
||||||
.getAsString(Phone.LABEL), contentValues
|
(phoneType == null ? Phone.TYPE_HOME : phoneType);
|
||||||
.getAsString(Phone.NUMBER));
|
appendVCardTelephoneLine(builder, phoneTypeAsPrimitive,
|
||||||
|
contentValues.getAsString(Phone.LABEL),
|
||||||
|
contentValues.getAsString(Phone.NUMBER));
|
||||||
}
|
}
|
||||||
} else if (mIsDoCoMo) {
|
} else if (mIsDoCoMo) {
|
||||||
appendVCardTelephoneLine(builder, Phone.TYPE_HOME, "", "");
|
appendVCardTelephoneLine(builder, Phone.TYPE_HOME, "", "");
|
||||||
@@ -1090,7 +1092,7 @@ public class VCardComposer {
|
|||||||
private void appendBirthday(final StringBuilder builder,
|
private void appendBirthday(final StringBuilder builder,
|
||||||
final Map<String, List<ContentValues>> contentValuesListMap) {
|
final Map<String, List<ContentValues>> contentValuesListMap) {
|
||||||
List<ContentValues> contentValuesList = contentValuesListMap
|
List<ContentValues> contentValuesList = contentValuesListMap
|
||||||
.get(Website.CONTENT_ITEM_TYPE);
|
.get(Miscellaneous.CONTENT_ITEM_TYPE);
|
||||||
if (contentValuesList != null && contentValuesList.size() > 0) {
|
if (contentValuesList != null && contentValuesList.size() > 0) {
|
||||||
// Theoretically, there must be only one birthday for each vCard data and
|
// Theoretically, there must be only one birthday for each vCard data and
|
||||||
// we are afraid of some parse error occuring in some devices, so
|
// we are afraid of some parse error occuring in some devices, so
|
||||||
|
|||||||
Reference in New Issue
Block a user