From 282479120906a9fcb1b0da1301c69e2986137cb0 Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Mon, 30 May 2016 13:55:47 +0900 Subject: [PATCH] Fix the bug for the A2DP connection When an application uses BT_AUDIO_PROFILE_TYPE_ALL to connect, HSP profile only be connected because of the wrong logic in bt-service's audio connected list. Change-Id: If1d9569a018bc02c1a3c863bd21e01ff6715533b Signed-off-by: DoHyun Pyun --- bt-service/bt-service-audio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bt-service/bt-service-audio.c b/bt-service/bt-service-audio.c index a16679a..31949eb 100755 --- a/bt-service/bt-service-audio.c +++ b/bt-service/bt-service-audio.c @@ -661,8 +661,10 @@ int _bt_audio_connect(int request_id, int type, if (__bt_device_support_uuid(address, BT_AUDIO_HSP)) { uuid = HFP_HS_UUID; func_data->pending = BT_PENDING_CONNECT; + type = BT_AUDIO_HSP; } else if (__bt_device_support_uuid(address, BT_AUDIO_A2DP)) { uuid = A2DP_SINK_UUID; + type = BT_AUDIO_A2DP; } else { BT_ERR("No audio role supported"); result = BLUETOOTH_ERROR_SERVICE_NOT_FOUND; -- 2.7.4