BT_ADAPTER_A2DP_ROLE_SINK = 0x02,
} bt_adapter_a2dp_role_e;
-static bt_adapter_a2dp_role_e a2dp_role_state = BT_ADAPTER_A2DP_ROLE_SOURCE;
-
/* Forward declarations */
static void __bt_adapter_event_handler(int event_type, gpointer event_data);
static void __bt_post_oal_init(void);
/* In Fhub case, both role(Source|Sink, 0x03) can be delivered */
__bt_handle_pending_a2dp_init(*a2dp_role);
- if (TIZEN_FEATURE_FHUB_REFERENCE) {
- a2dp_role_state = *a2dp_role;
- if (adapter_state == BT_ACTIVATED) {
- BT_DBG("Set visible mode by a2dp role");
- __bt_set_visible_mode();
- }
- }
-
break;
}
case OAL_EVENT_CONTROLLER_ERROR_RECEIVED: {
BT_INFO("__bt_adapter_post_set_enabled>>");
- if (TIZEN_FEATURE_DA_REFERENCE) {
- /* If non-Fhub, visible off even if headless device.
- * If Fhub, visible on when a2dp role sink(speaker). otherwise, visible off */
- if (TIZEN_FEATURE_FHUB_REFERENCE && a2dp_role_state & BT_ADAPTER_A2DP_ROLE_SINK) {
- BT_DBG("It is initial state.. Set General Discoverable Mode");
+ if (TIZEN_FEATURE_FHUB_REFERENCE) {
+ _bt_set_connectable(TRUE);
+ __bt_set_visible_mode();
+ } else if (TIZEN_FEATURE_DA_REFERENCE) {
+ if (headed_plugin_info->plugin_headed_enabled) {
+ BT_DBG("DA Headed devices. Set General Discoverable Mode");
if (BLUETOOTH_ERROR_NONE != _bt_set_discoverable_mode(
BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE, 0))
BT_ERR("Fail to set discoverable mode");
} else {
+ BT_DBG("DA Headless devices. Set Connectable Mode");
if (BLUETOOTH_ERROR_NONE != _bt_set_discoverable_mode(
BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE, 0))
BT_ERR("Fail to set connectable mode");
if (vconf_get_int(BT_FILE_VISIBLE_TIME, &timeout) != 0)
BT_ERR("Fail to get the timeout value");
- if (TIZEN_FEATURE_FHUB_REFERENCE) {
- BT_DBG("timeout : %d, a2dp_role : %d", timeout, a2dp_role_state);
- if (timeout == 0 && a2dp_role_state & BT_ADAPTER_A2DP_ROLE_SINK) {
- BT_DBG("It is initial state.. Set General Discoverable Mode");
- if (_bt_set_discoverable_mode(
- BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE,
- timeout) != BLUETOOTH_ERROR_NONE) {
- BT_ERR("Set discoverable mode failed");
- }
- return;
- }
- }
-
_bt_dpm_get_bluetooth_limited_discoverable_state(&discoverable_state);
if (timeout == -1 || discoverable_state == DPM_RESTRICTED) {
if (_bt_set_discoverable_mode(