Fix for dual-mode devices advertising with a single address
* BTM_ReadRemoteDeviceName checks if a device is connectable over LE before making a connection. However, when it is not connectable over LE, it could be connectable over BR/EDR. * For Dual Mode device, the device type should be 0x3 and is not equal to BT_DEVICE_TYPE_BREDR, hence we cannot check equality to determine whether a device is BR/EDR, but need to AND them and check the result. * btm_ble_read_remote_name() already checks if device is connectable in LE, and we do not need to do it in BTM_ReadRemoteDeviceName(). * This fix removes the check from BTM_ReadRemoteDeviceName * This fix also adds error checking to return values of BTM_ReadRemoteDeviceName * This fix moves inquiry database query to respective remote name request procedures, as the result of the query is used in those procedures instead of in BTM_ReadRemoteDeviceName() Bug: 35348392 Test: make, pair with device that advertise on both LE and BR/EDR Change-Id: I10d1aa9dd6e2447f9b9d40b1fea9370b5088a57d
Showing
- system/stack/btm/btm_ble_gap.cc 3 additions, 3 deletionssystem/stack/btm/btm_ble_gap.cc
- system/stack/btm/btm_ble_int.h 0 additions, 1 deletionsystem/stack/btm/btm_ble_int.h
- system/stack/btm/btm_inq.cc 15 additions, 32 deletionssystem/stack/btm/btm_inq.cc
- system/stack/btm/btm_int.h 1 addition, 2 deletionssystem/stack/btm/btm_int.h
- system/stack/btm/btm_sec.cc 32 additions, 13 deletionssystem/stack/btm/btm_sec.cc
Loading
Please register or sign in to comment