Remove A2DP related logic for Fhub only 03/303503/1
authorWootak Jung <wootak.jung@samsung.com>
Wed, 27 Dec 2023 22:46:27 +0000 (07:46 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Fri, 29 Dec 2023 01:23:09 +0000 (10:23 +0900)
Change-Id: I231596417f1827eeb4eb0866f0e505adbec1ea37
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
bt-service/services/audio/a2dp_src/bt-service-a2dp-src.c
bt-service/services/audio/bt-service-audio.c
bt-service/services/device/bt-service-core-device.c

index 2a2a42f..56410b9 100644 (file)
@@ -357,16 +357,7 @@ void _bt_a2dp_src_handle_incoming_authorization(char *address, int service_id)
 
        switch (service_id) {
        case A2DP_SERVICE_ID:
-               if (TIZEN_FEATURE_FHUB_REFERENCE) {
-                       if (_bt_audio_get_current_role() == BLUETOOTH_A2DP_SOURCE) {
-                               BT_INFO("Current local A2DP role is Source.. Check current connected A2DP sink remote device");
-                               connected = _bt_is_headset_type_connected(BT_AUDIO_A2DP, connected_address);
-                       } else {
-                               BT_INFO("Current local A2DP role is Sink.. Check current connected A2DP source remote device");
-                               connected = _bt_is_headset_type_connected(BT_AUDIO_A2DP_SOURCE, connected_address);
-                       }
-               } else
-                       connected = _bt_is_headset_type_connected(BT_AUDIO_A2DP, connected_address);
+               connected = _bt_is_headset_type_connected(BT_AUDIO_A2DP, connected_address);
 
                if (connected) {
                        BT_INFO("A2DP is already connected..check which device..");
index 05006a3..d26f414 100644 (file)
@@ -1399,26 +1399,6 @@ void _bt_audio_handle_incoming_authorization(char *address, int service_id)
                return;
        }
 
-       if (TIZEN_FEATURE_FHUB_REFERENCE) {
-               if (service_id == HFP_HS_SERVICE_ID && curr_audio_role == BLUETOOTH_A2DP_SOURCE) {
-                       BT_INFO("Current local A2DP role is Source.. reject [%s] device authorization request with [%d]",
-                                       address, service_id);
-                       res = device_reply_auth_request((bt_address_t*)&device_address, service_id, FALSE, FALSE);
-                       if (res != OAL_STATUS_SUCCESS)
-                               BT_ERR("authorize_response: %d", res);
-                       return;
-               }
-
-               if (service_id == AVRCP_SERVICE_ID && curr_audio_role == BLUETOOTH_A2DP_SINK) {
-                       BT_INFO("Current local A2DP role is Sink.. reject [%s] device authorization request with [%d]",
-                                       address, service_id);
-                       res = device_reply_auth_request((bt_address_t*)&device_address, service_id, FALSE, FALSE);
-                       if (res != OAL_STATUS_SUCCESS)
-                               BT_ERR("authorize_response: %d", res);
-                       return;
-               }
-       }
-
        if (connected) {
                BT_INFO("[%d] device is already connected..check which device..", service_id);
                if (g_strcmp0(connected_address, address) != 0) {
index 061639c..c27fb75 100644 (file)
@@ -618,14 +618,8 @@ static void __bt_device_authorization_request_callback(event_dev_authorize_req_t
                _bt_a2dp_sink_handle_incoming_authorization(address, service_id);
                break;
        case AVRCP_SERVICE_ID:
-               if (TIZEN_FEATURE_FHUB_REFERENCE) {
-                       BT_DBG("Incoming AVRCP Profile conn Req from device addr [%s]", address);
-                       _bt_audio_handle_incoming_authorization(address, service_id);
-                       return;
-               } else {
-                       BT_DBG("Incoming AVRCP (Remote) Profile conn Req from device addr [%s]", address);
-                       break;
-               }
+               BT_DBG("Incoming AVRCP (Remote) Profile conn Req from device addr [%s]", address);
+               break;
        case AVRCP_CT_SERVICE_ID:
                BT_DBG("Incoming AVRCP (Remote: Controller) Profile conn Req from device addr [%s]", address);
                break;