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;
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)
//_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();
/* TODO:Add timer function to handle any further post processing */
g_idle_add((GSourceFunc)__bt_adapter_post_set_enabled, NULL);
- /*Return BT_ADAPTER_ENABLE Method invocation context */
- __bt_adapter_handle_pending_requests(BT_ENABLE_ADAPTER, NULL, 0);
/*Send BT Enabled event to application */
_bt_send_event(BT_ADAPTER_EVENT, BLUETOOTH_EVENT_ENABLED,
g_variant_new("(i)", result));
/* TODO:Add timer function to handle any further post processing */
g_idle_add((GSourceFunc)__bt_adapter_post_set_disabled, NULL);
- /* Return BT_ADAPTER_DISABLE Method invocation context */
- __bt_adapter_handle_pending_requests(BT_DISABLE_ADAPTER, NULL, 0);
-
/* Send BT Disabled event to application */
_bt_send_event(BT_ADAPTER_EVENT, BLUETOOTH_EVENT_DISABLED,
g_variant_new("(i)", result));