summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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++;