#include "main/shim/entry.h"
#include "main/shim/helpers.h"
#include "main/shim/shim.h"
+#include "stack/btm/btm_dev.h"
#include "stack/btm/btm_int_types.h"
#include "types/bt_transport.h"
#include "types/raw_address.h"
}
tBLE_ADDR_TYPE Btm::GetAddressType(const RawAddress& bd_addr) {
+ tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
+ if (p_dev_rec != NULL && p_dev_rec->device_type & BT_DEVICE_TYPE_BLE) {
+ if (!p_dev_rec->ble.identity_address_with_type.bda.IsEmpty()) {
+ return p_dev_rec->ble.identity_address_with_type.type;
+ } else {
+ return p_dev_rec->ble.ble_addr_type;
+ }
+ }
if (le_address_type_cache_.count(bd_addr) == 0) {
LOG(ERROR) << "Unknown bd_addr. Use public address";
return BLE_ADDR_PUBLIC;