OSDN Git Service

Fixed displaying images in pbap browse and pull when configured
authorfredc <fredc@broadcom.com>
Sat, 19 May 2012 00:42:09 +0000 (17:42 -0700)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Tue, 17 Jul 2012 05:09:03 +0000 (22:09 -0700)
Change-Id: I8315d4db76d7cbfeaefe4187100984d12bd952ed

src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java

index 37156fa..001d4c2 100644 (file)
@@ -120,6 +120,11 @@ public class BluetoothPbapVcardManager {
         } else {
             vcardType = VCardConfig.VCARD_TYPE_V30_GENERIC;
         }
+
+        if (!BluetoothPbapConfig.includePhotosInVcard()) {
+            vcardType |= VCardConfig.FLAG_REFRAIN_IMAGE_EXPORT;
+        }
+
         return BluetoothPbapUtils.createProfileVCard(mContext, vcardType,filter);
     }
 
@@ -480,7 +485,10 @@ public class BluetoothPbapVcardManager {
                 } else {
                     vcardType = VCardConfig.VCARD_TYPE_V30_GENERIC;
                 }
-                vcardType |= VCardConfig.FLAG_REFRAIN_IMAGE_EXPORT;
+
+                if (!BluetoothPbapConfig.includePhotosInVcard()) {
+                    vcardType |= VCardConfig.FLAG_REFRAIN_IMAGE_EXPORT;
+                }
 
                 //Enhancement: customize Vcard based on preferences/settings and input from caller
                 composer = BluetoothPbapUtils.createFilteredVCardComposer(mContext, vcardType,null);