Merge change I73d6c0f8 into eclair
* changes: Add ability to disable sending Photos using Vcard. Do Not Merge
This commit is contained in:
@ -313,6 +313,8 @@ public class VCardComposer {
|
|||||||
|
|
||||||
private boolean mIsCallLogComposer = false;
|
private boolean mIsCallLogComposer = false;
|
||||||
|
|
||||||
|
private boolean mNeedPhotoForVCard = true;
|
||||||
|
|
||||||
private static final String[] sContactsProjection = new String[] {
|
private static final String[] sContactsProjection = new String[] {
|
||||||
Contacts._ID,
|
Contacts._ID,
|
||||||
};
|
};
|
||||||
@ -332,17 +334,17 @@ public class VCardComposer {
|
|||||||
private static final String FLAG_TIMEZONE_UTC = "Z";
|
private static final String FLAG_TIMEZONE_UTC = "Z";
|
||||||
|
|
||||||
public VCardComposer(Context context) {
|
public VCardComposer(Context context) {
|
||||||
this(context, VCardConfig.VCARD_TYPE_DEFAULT, true, false);
|
this(context, VCardConfig.VCARD_TYPE_DEFAULT, true, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public VCardComposer(Context context, String vcardTypeStr,
|
public VCardComposer(Context context, String vcardTypeStr,
|
||||||
boolean careHandlerErrors) {
|
boolean careHandlerErrors) {
|
||||||
this(context, VCardConfig.getVCardTypeFromString(vcardTypeStr),
|
this(context, VCardConfig.getVCardTypeFromString(vcardTypeStr),
|
||||||
careHandlerErrors, false);
|
careHandlerErrors, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public VCardComposer(Context context, int vcardType, boolean careHandlerErrors) {
|
public VCardComposer(Context context, int vcardType, boolean careHandlerErrors) {
|
||||||
this(context, vcardType, careHandlerErrors, false);
|
this(context, vcardType, careHandlerErrors, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -351,11 +353,12 @@ public class VCardComposer {
|
|||||||
* @param isCallLogComposer true if this composer is for creating Call Log vCard.
|
* @param isCallLogComposer true if this composer is for creating Call Log vCard.
|
||||||
*/
|
*/
|
||||||
public VCardComposer(Context context, int vcardType, boolean careHandlerErrors,
|
public VCardComposer(Context context, int vcardType, boolean careHandlerErrors,
|
||||||
boolean isCallLogComposer) {
|
boolean isCallLogComposer, boolean needPhotoInVCard) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mVCardType = vcardType;
|
mVCardType = vcardType;
|
||||||
mCareHandlerErrors = careHandlerErrors;
|
mCareHandlerErrors = careHandlerErrors;
|
||||||
mIsCallLogComposer = isCallLogComposer;
|
mIsCallLogComposer = isCallLogComposer;
|
||||||
|
mNeedPhotoForVCard = needPhotoInVCard;
|
||||||
mContentResolver = context.getContentResolver();
|
mContentResolver = context.getContentResolver();
|
||||||
|
|
||||||
mIsV30 = VCardConfig.isV30(vcardType);
|
mIsV30 = VCardConfig.isV30(vcardType);
|
||||||
@ -679,7 +682,9 @@ public class VCardComposer {
|
|||||||
appendWebsites(builder, contentValuesListMap);
|
appendWebsites(builder, contentValuesListMap);
|
||||||
appendBirthday(builder, contentValuesListMap);
|
appendBirthday(builder, contentValuesListMap);
|
||||||
appendOrganizations(builder, contentValuesListMap);
|
appendOrganizations(builder, contentValuesListMap);
|
||||||
|
if (mNeedPhotoForVCard) {
|
||||||
appendPhotos(builder, contentValuesListMap);
|
appendPhotos(builder, contentValuesListMap);
|
||||||
|
}
|
||||||
appendNotes(builder, contentValuesListMap);
|
appendNotes(builder, contentValuesListMap);
|
||||||
// TODO: GroupMembership
|
// TODO: GroupMembership
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user