From 76c2157c8fc452159f371099bc0833690e62c3fe Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Fri, 29 Nov 2019 12:45:11 +0900 Subject: [PATCH] Modify the initial value for A2DP pending init Change-Id: Ia367562372822d065e124062183f10412e94991b Signed-off-by: DoHyun Pyun --- .../services/adapter/bt-service-core-adapter.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/bt-service-adaptation/services/adapter/bt-service-core-adapter.c b/bt-service-adaptation/services/adapter/bt-service-core-adapter.c index e240822..b072256 100644 --- a/bt-service-adaptation/services/adapter/bt-service-core-adapter.c +++ b/bt-service-adaptation/services/adapter/bt-service-core-adapter.c @@ -77,7 +77,7 @@ static bt_adapter_timer_t visible_timer; static guint timer_id = 0; -static gboolean a2dp_init_pending = FALSE; +static gboolean a2dp_init_pending = TRUE; /* Adapter default states */ static bt_status_t adapter_state = BT_DEACTIVATED; @@ -979,17 +979,6 @@ int _bt_init_profiles() if (ret != BLUETOOTH_ERROR_NONE) BT_ERR("_bt_socket_init Failed"); - /* - * Query local adapter services and based on a2dp service uuids initialized - * in bluetooth stack, enable A2DP sourec or A2DP sink role. - */ - ret = adapter_get_service_uuids(); - if (ret != OAL_STATUS_SUCCESS) - BT_ERR("adapter_get_service_uuids failed: %d", ret); - else - a2dp_init_pending = TRUE; - - /* Initialize HFP Audio Gateway */ ret = _bt_audio_initialize(BT_AG_MODULE); if (ret != BLUETOOTH_ERROR_NONE) @@ -1029,6 +1018,8 @@ int _bt_cleanup_profiles(void) //_bt_audio_deinitialize(BT_AG_MODULE); //_bt_audio_deinitialize(BT_AVRCP_CTRL_MODULE); //_bt_audio_deinitialize(BT_AUDIO_ALL_MODULE); + + a2dp_init_pending = TRUE; #endif _bt_hdp_deinit(); _bt_gatt_deinit(); -- 2.7.4