Disable sending Photo field for PBAP. Do Not Merge.
Some car kits don't handle contacts with Photo Fields well.
Disable this field for the time being.
Original Change by: Yue Lixin
Bug: 2183320
Dr No: Eastham
diff --git a/src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java b/src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java
index 8a056f8..96c5343 100644
--- a/src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java
+++ b/src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java
@@ -360,20 +360,19 @@
VCardComposer composer = null;
try {
// Currently only support Generic Vcard 2.1 and 3.0
- int vcardType;
+ final int vcardType;
if (vcardType21) {
vcardType = VCardConfig.VCARD_TYPE_V21_GENERIC;
} else {
vcardType = VCardConfig.VCARD_TYPE_V30_GENERIC;
}
- if (isContacts) {
- // create VCardComposer for contacts
- composer = new VCardComposer(mContext, vcardType, true);
- } else {
- // create VCardComposer for call logs
- composer = new VCardComposer(mContext, vcardType, true, true);
- }
+ final boolean careHandlerErrors = true;
+ final boolean needPhoto = false; //We disable photo for the time being
+ final boolean isCallLogComposer = !isContacts;
+
+ composer = new VCardComposer(mContext, vcardType, careHandlerErrors, isCallLogComposer,
+ needPhoto);
composer.addHandler(new HandlerForStringBuffer(op, ownerVCard));