summaryrefslogtreecommitdiffstats
path: root/btif
diff options
context:
space:
mode:
authorRavi Nagarajan <nravi@broadcom.com>2012-09-27 03:57:39 -0700
committerMatthew Xie <mattx@google.com>2012-09-28 18:20:25 -0700
commitda7c9bed22fa8f18e50aa965319fb92131740fca (patch)
treea469273c7cf2825f253a78daa1fe58253963d1bc /btif
parent8df5a50e36a63507aa6fa8bbfe23e5c67fe4f8b5 (diff)
downloadexternal_bluetooth_bluedroid-da7c9bed22fa8f18e50aa965319fb92131740fca.zip
external_bluetooth_bluedroid-da7c9bed22fa8f18e50aa965319fb92131740fca.tar.gz
external_bluetooth_bluedroid-da7c9bed22fa8f18e50aa965319fb92131740fca.tar.bz2
Send the enabled hfp/hsp service UUIDs based on config
On platforms where HFP is disabled, we were incorrectly notifying upper layer of HFP support in local uuids. Use the build config to determine the right set of local UUIDs bug 7232184 Change-Id: Ica308dd879336300714e97d3441334e16471359a
Diffstat (limited to 'btif')
-rwxr-xr-x[-rw-r--r--]btif/src/btif_dm.c1
-rwxr-xr-x[-rw-r--r--]btif/src/btif_hf.c8
-rwxr-xr-x[-rw-r--r--]btif/src/btif_storage.c4
3 files changed, 12 insertions, 1 deletions
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index ac46e87..5517f55 100644..100755
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -119,6 +119,7 @@ bt_status_t btif_in_execute_service_request(tBTA_SERVICE_ID service_id,
switch (service_id)
{
case BTA_HFP_SERVICE_ID:
+ case BTA_HSP_SERVICE_ID:
{
btif_hf_execute_service(b_enable);
}break;
diff --git a/btif/src/btif_hf.c b/btif/src/btif_hf.c
index 8e605d5..49b0257 100644..100755
--- a/btif/src/btif_hf.c
+++ b/btif/src/btif_hf.c
@@ -484,8 +484,14 @@ static bt_status_t init( bthf_callbacks_t* callbacks )
bt_hf_callbacks = callbacks;
/* Invoke the enable service API to the core to set the appropriate service_id
- * Internally, the HSP_SERVICE_ID shall also be enabled */
+ * Internally, the HSP_SERVICE_ID shall also be enabled if HFP is enabled (phone)
+ * othwerwise only HSP is enabled (tablet)
+ */
+#if (defined(BTIF_HF_SERVICES) && (BTIF_HF_SERVICES & BTA_HFP_SERVICE_MASK))
btif_enable_service(BTA_HFP_SERVICE_ID);
+#else
+ btif_enable_service(BTA_HSP_SERVICE_ID);
+#endif
memset(&btif_hf_cb, 0, sizeof(btif_hf_cb_t));
clear_phone_state();
diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c
index bd0ed28..6d702a7 100644..100755
--- a/btif/src/btif_storage.c
+++ b/btif/src/btif_storage.c
@@ -554,6 +554,10 @@ bt_status_t btif_storage_get_adapter_property(bt_property_t *property)
uuid16_to_uuid128(UUID_SERVCLASS_AG_HANDSFREE,
p_uuid+num_uuids);
num_uuids++;
+ }
+ /* intentional fall through: Send both BFP & HSP UUIDs if HFP is enabled */
+ case BTA_HSP_SERVICE_ID:
+ {
uuid16_to_uuid128(UUID_SERVCLASS_HEADSET_AUDIO_GATEWAY,
p_uuid+num_uuids);
num_uuids++;