__bt_handle_pending_a2dp_init(*a2dp_role);
- if (TIZEN_FEATURE_FHUB_REFERENCE)
- if (a2dp_role != NULL)
- a2dp_role_state = *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;
}
BT_INFO("__bt_adapter_post_set_enabled>>");
- if (TIZEN_PROFILE_TV || TIZEN_FEATURE_ROBOT_REFERENCE ||
+ 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 (BLUETOOTH_ERROR_NONE != _bt_set_discoverable_mode(
+ BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE, 0))
+ BT_ERR("Fail to set discoverable mode");
+ } else {
+ if (BLUETOOTH_ERROR_NONE != _bt_set_discoverable_mode(
+ BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE, 0))
+ BT_ERR("Fail to set connectable mode");
+ }
+ } else if (TIZEN_PROFILE_TV || TIZEN_FEATURE_ROBOT_REFERENCE ||
!headed_plugin_info->plugin_headed_enabled) {
if (BLUETOOTH_ERROR_NONE != _bt_set_discoverable_mode(
BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE, 0))
/* Tizen IOT Speaker - The default visible mode is off */
if (BLUETOOTH_ERROR_NONE != _bt_set_discoverable_mode(
BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE, 0))
- BT_ERR("Fail to set discoverable mode");
+ BT_ERR("Fail to set connectable mode");
} else {
__bt_set_visible_mode();
}
if (_bt_set_discoverable_mode(
BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE,
timeout) != BLUETOOTH_ERROR_NONE) {
- BT_ERR("Set connectable mode failed");
+ BT_ERR("Set discoverable mode failed");
}
return;
}