summaryrefslogtreecommitdiffstats
path: root/bta/dm/bta_dm_act.c
diff options
context:
space:
mode:
Diffstat (limited to 'bta/dm/bta_dm_act.c')
-rw-r--r--bta/dm/bta_dm_act.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/bta/dm/bta_dm_act.c b/bta/dm/bta_dm_act.c
index 7fc46abaa..f3500c554 100644
--- a/bta/dm/bta_dm_act.c
+++ b/bta/dm/bta_dm_act.c
@@ -547,17 +547,23 @@ void bta_dm_set_dev_name (tBTA_DM_MSG *p_data)
void bta_dm_set_visibility(tBTA_DM_MSG *p_data)
{
UINT16 window, interval;
+#if BLE_INCLUDED == TRUE
UINT16 le_disc_mode = BTM_BleReadDiscoverability();
+#endif
UINT16 disc_mode = BTM_ReadDiscoverability(&window, &interval);
+#if BLE_INCLUDED == TRUE
UINT16 le_conn_mode = BTM_BleReadConnectability();
+#endif
UINT16 conn_mode = BTM_ReadConnectability(&window, &interval);
/* set modes for Discoverability and connectability if not ignore */
if (p_data->set_visibility.disc_mode != (BTA_DM_IGNORE | BTA_DM_LE_IGNORE))
{
+#if BLE_INCLUDED == TRUE
if ((p_data->set_visibility.disc_mode & BTA_DM_LE_IGNORE) == BTA_DM_LE_IGNORE)
p_data->set_visibility.disc_mode =
((p_data->set_visibility.disc_mode & ~BTA_DM_LE_IGNORE) | le_disc_mode);
+#endif
if ((p_data->set_visibility.disc_mode & BTA_DM_IGNORE) == BTA_DM_IGNORE)
p_data->set_visibility.disc_mode =
@@ -570,9 +576,11 @@ void bta_dm_set_visibility(tBTA_DM_MSG *p_data)
if (p_data->set_visibility.conn_mode != (BTA_DM_IGNORE | BTA_DM_LE_IGNORE))
{
+#if BLE_INCLUDED == TRUE
if ((p_data->set_visibility.conn_mode & BTA_DM_LE_IGNORE) == BTA_DM_LE_IGNORE)
p_data->set_visibility.conn_mode =
((p_data->set_visibility.conn_mode & ~BTA_DM_LE_IGNORE) | le_conn_mode);
+#endif
if ((p_data->set_visibility.conn_mode & BTA_DM_IGNORE) == BTA_DM_IGNORE)
p_data->set_visibility.conn_mode =
@@ -608,7 +616,6 @@ void bta_dm_set_visibility(tBTA_DM_MSG *p_data)
/* Change mode if either mode is not ignore */
if (p_data->set_visibility.pair_mode != BTA_DM_IGNORE || p_data->set_visibility.conn_paired_only != BTA_DM_IGNORE)
BTM_SetPairableMode((BOOLEAN)(!(bta_dm_cb.disable_pair_mode)),bta_dm_cb.conn_paired_only);
-
}
/*******************************************************************************
@@ -715,16 +722,17 @@ void bta_dm_remove_device(tBTA_DM_MSG *p_data)
if (!bdcmp(bta_dm_cb.device_list.peer_device[i].peer_bdaddr, p_dev->bd_addr))
{
bta_dm_cb.device_list.peer_device[i].conn_state = BTA_DM_UNPAIRING;
+#if BTA_GATT_INCLUDED == TRUE
btm_remove_acl( p_dev->bd_addr, bta_dm_cb.device_list.peer_device[i].transport);
APPL_TRACE_DEBUG("%s:transport = %d", __func__,
bta_dm_cb.device_list.peer_device[i].transport);
-
/* save the other transport to check if device is connected on other_transport */
if(bta_dm_cb.device_list.peer_device[i].transport == BT_TRANSPORT_LE)
other_transport = BT_TRANSPORT_BR_EDR;
else
other_transport = BT_TRANSPORT_LE;
break;
+#endif
}
}
}
@@ -736,6 +744,7 @@ void bta_dm_remove_device(tBTA_DM_MSG *p_data)
// If it is DUMO device and device is paired as different address, unpair that device
// if different address
BOOLEAN continue_delete_other_dev = FALSE;
+#if BTA_GATT_INCLUDED == TRUE
if ((other_transport && (BTM_ReadConnectedTransportAddress(other_address, other_transport))) ||
(!other_transport && (BTM_ReadConnectedTransportAddress(other_address, BT_TRANSPORT_INVALID))))
{
@@ -746,7 +755,9 @@ void bta_dm_remove_device(tBTA_DM_MSG *p_data)
if (!bdcmp(bta_dm_cb.device_list.peer_device[i].peer_bdaddr, other_address))
{
bta_dm_cb.device_list.peer_device[i].conn_state = BTA_DM_UNPAIRING;
+#if BTA_GATT_INCLUDED == TRUE
btm_remove_acl(other_address,bta_dm_cb.device_list.peer_device[i].transport);
+#endif
break;
}
}
@@ -756,7 +767,7 @@ void bta_dm_remove_device(tBTA_DM_MSG *p_data)
APPL_TRACE_DEBUG("%s: continue to delete the other dev ", __func__);
continue_delete_other_dev = TRUE;
}
-
+#endif
/* Delete the device mentioned in the msg */
if (continue_delete_dev)
bta_dm_process_remove_device(p_dev->bd_addr);
@@ -2361,7 +2372,7 @@ static void bta_dm_discover_device(BD_ADDR remote_bd_addr)
APPL_TRACE_DEBUG("%s appl_knows_rem_name %d", __func__,
bta_dm_search_cb.p_btm_inq_info->appl_knows_rem_name);
}
-
+#if BTA_GATT_INCLUDED == TRUE
if((bta_dm_search_cb.p_btm_inq_info)
&& (bta_dm_search_cb.p_btm_inq_info->results.device_type == BT_DEVICE_TYPE_BLE)
&& (bta_dm_search_cb.state == BTA_DM_SEARCH_ACTIVE))
@@ -2369,7 +2380,7 @@ static void bta_dm_discover_device(BD_ADDR remote_bd_addr)
/* Do not perform RNR for LE devices at inquiry complete*/
bta_dm_search_cb.name_discover_done = TRUE;
}
-
+#endif
/* if name discovery is not done and application needs remote name */
if ((!bta_dm_search_cb.name_discover_done)
&& (( bta_dm_search_cb.p_btm_inq_info == NULL )