Loading system/btif/src/btif_dm.cc +22 −1 Original line number Diff line number Diff line Loading @@ -672,7 +672,15 @@ static void btif_dm_cb_create_bond(bt_bdaddr_t* bd_addr, } if (btif_storage_get_remote_addr_type(bd_addr, &addr_type) != BT_STATUS_SUCCESS) { btif_storage_set_remote_addr_type(bd_addr, BLE_ADDR_PUBLIC); // Try to read address type. OOB pairing might have set it earlier, but // didn't store it, it defaults to BLE_ADDR_PUBLIC uint8_t tmp_dev_type; uint8_t tmp_addr_type; BTM_ReadDevInfo(bd_addr->address, &tmp_dev_type, &tmp_addr_type); addr_type = tmp_addr_type; btif_storage_set_remote_addr_type(bd_addr, addr_type); } } if ((btif_config_get_int((char const*)&bdstr, "DevType", &device_type) && Loading Loading @@ -2292,6 +2300,19 @@ bt_status_t btif_dm_create_bond_out_of_band( bdcpy(oob_cb.bdaddr, bd_addr->address); memcpy(&oob_cb.oob_data, oob_data, sizeof(bt_out_of_band_data_t)); uint8_t empty[] = {0, 0, 0, 0, 0, 0, 0}; // If LE Bluetooth Device Address is provided, use provided address type // value. if (memcmp(oob_data->le_bt_dev_addr, empty, 7) != 0) { /* byte no 7 is address type in LE Bluetooth Address OOB data */ uint8_t address_type = oob_data->le_bt_dev_addr[6]; if (address_type == BLE_ADDR_PUBLIC || address_type == BLE_ADDR_RANDOM) { // bd_addr->address is already reversed, so use it instead of // oob_data->le_bt_dev_addr BTM_SecAddBleDevice(bd_addr->address, NULL, BT_DEVICE_TYPE_BLE, address_type); } } bdstr_t bdstr; BTIF_TRACE_EVENT("%s: bd_addr=%s, transport=%d", __func__, bdaddr_to_string(bd_addr, bdstr, sizeof(bdstr)), transport); Loading system/stack/btm/btm_acl.cc +1 −1 Original line number Diff line number Diff line Loading @@ -1388,7 +1388,7 @@ uint16_t btm_get_acl_disc_reason_code (void) ** Returns the handle of the connection, or 0xFFFF if none. ** *******************************************************************************/ uint16_t BTM_GetHCIConnHandle (BD_ADDR remote_bda, tBT_TRANSPORT transport) uint16_t BTM_GetHCIConnHandle (const BD_ADDR remote_bda, tBT_TRANSPORT transport) { tACL_CONN *p; BTM_TRACE_DEBUG ("BTM_GetHCIConnHandle"); Loading system/stack/btm/btm_ble.cc +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ extern bool aes_cipher_msg_auth_code(BT_OCTET16 key, uint8_t *input, uint16_t ** Returns true if added OK, else false ** *******************************************************************************/ bool BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type, bool BTM_SecAddBleDevice (const BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE addr_type) { BTM_TRACE_DEBUG ("%s: dev_type=0x%x", __func__, dev_type); Loading system/stack/include/btm_api.h +1 −1 Original line number Diff line number Diff line Loading @@ -1851,7 +1851,7 @@ extern tBTM_STATUS BTM_SetSsrParams (BD_ADDR remote_bda, uint16_t max_lat, ** Returns the handle of the connection, or 0xFFFF if none. ** *******************************************************************************/ extern uint16_t BTM_GetHCIConnHandle (BD_ADDR remote_bda, tBT_TRANSPORT transport); extern uint16_t BTM_GetHCIConnHandle (const BD_ADDR remote_bda, tBT_TRANSPORT transport); /******************************************************************************* ** Loading system/stack/include/btm_ble_api.h +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ tBTM_BLE_SCAN_SETUP_CBACK bta_ble_scan_setup_cb; ** Returns true if added OK, else false ** *******************************************************************************/ extern bool BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, extern bool BTM_SecAddBleDevice (const BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE addr_type); /******************************************************************************* Loading Loading
system/btif/src/btif_dm.cc +22 −1 Original line number Diff line number Diff line Loading @@ -672,7 +672,15 @@ static void btif_dm_cb_create_bond(bt_bdaddr_t* bd_addr, } if (btif_storage_get_remote_addr_type(bd_addr, &addr_type) != BT_STATUS_SUCCESS) { btif_storage_set_remote_addr_type(bd_addr, BLE_ADDR_PUBLIC); // Try to read address type. OOB pairing might have set it earlier, but // didn't store it, it defaults to BLE_ADDR_PUBLIC uint8_t tmp_dev_type; uint8_t tmp_addr_type; BTM_ReadDevInfo(bd_addr->address, &tmp_dev_type, &tmp_addr_type); addr_type = tmp_addr_type; btif_storage_set_remote_addr_type(bd_addr, addr_type); } } if ((btif_config_get_int((char const*)&bdstr, "DevType", &device_type) && Loading Loading @@ -2292,6 +2300,19 @@ bt_status_t btif_dm_create_bond_out_of_band( bdcpy(oob_cb.bdaddr, bd_addr->address); memcpy(&oob_cb.oob_data, oob_data, sizeof(bt_out_of_band_data_t)); uint8_t empty[] = {0, 0, 0, 0, 0, 0, 0}; // If LE Bluetooth Device Address is provided, use provided address type // value. if (memcmp(oob_data->le_bt_dev_addr, empty, 7) != 0) { /* byte no 7 is address type in LE Bluetooth Address OOB data */ uint8_t address_type = oob_data->le_bt_dev_addr[6]; if (address_type == BLE_ADDR_PUBLIC || address_type == BLE_ADDR_RANDOM) { // bd_addr->address is already reversed, so use it instead of // oob_data->le_bt_dev_addr BTM_SecAddBleDevice(bd_addr->address, NULL, BT_DEVICE_TYPE_BLE, address_type); } } bdstr_t bdstr; BTIF_TRACE_EVENT("%s: bd_addr=%s, transport=%d", __func__, bdaddr_to_string(bd_addr, bdstr, sizeof(bdstr)), transport); Loading
system/stack/btm/btm_acl.cc +1 −1 Original line number Diff line number Diff line Loading @@ -1388,7 +1388,7 @@ uint16_t btm_get_acl_disc_reason_code (void) ** Returns the handle of the connection, or 0xFFFF if none. ** *******************************************************************************/ uint16_t BTM_GetHCIConnHandle (BD_ADDR remote_bda, tBT_TRANSPORT transport) uint16_t BTM_GetHCIConnHandle (const BD_ADDR remote_bda, tBT_TRANSPORT transport) { tACL_CONN *p; BTM_TRACE_DEBUG ("BTM_GetHCIConnHandle"); Loading
system/stack/btm/btm_ble.cc +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ extern bool aes_cipher_msg_auth_code(BT_OCTET16 key, uint8_t *input, uint16_t ** Returns true if added OK, else false ** *******************************************************************************/ bool BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type, bool BTM_SecAddBleDevice (const BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE addr_type) { BTM_TRACE_DEBUG ("%s: dev_type=0x%x", __func__, dev_type); Loading
system/stack/include/btm_api.h +1 −1 Original line number Diff line number Diff line Loading @@ -1851,7 +1851,7 @@ extern tBTM_STATUS BTM_SetSsrParams (BD_ADDR remote_bda, uint16_t max_lat, ** Returns the handle of the connection, or 0xFFFF if none. ** *******************************************************************************/ extern uint16_t BTM_GetHCIConnHandle (BD_ADDR remote_bda, tBT_TRANSPORT transport); extern uint16_t BTM_GetHCIConnHandle (const BD_ADDR remote_bda, tBT_TRANSPORT transport); /******************************************************************************* ** Loading
system/stack/include/btm_ble_api.h +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ tBTM_BLE_SCAN_SETUP_CBACK bta_ble_scan_setup_cb; ** Returns true if added OK, else false ** *******************************************************************************/ extern bool BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, extern bool BTM_SecAddBleDevice (const BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE addr_type); /******************************************************************************* Loading