summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Melin <tobias.melin@sonymobile.com>2014-12-17 11:24:31 +0100
committerPrerepa Viswanadham <dham@google.com>2014-12-22 13:53:49 -0800
commit2cfcf51ea3447f2b5cf95dbe7515d230de1e7df7 (patch)
tree73f6de24049cd74ef9848d412d3bff24f7e411c3
parent01a069a228cb63988e502aed01a73a2a1d8a59eb (diff)
downloadbluedroid-2cfcf51ea3447f2b5cf95dbe7515d230de1e7df7.tar.gz
Added check if the device address is random
A check if the device address is random is needed since in a public device address the two most significatant bits can also be equal to 01 (see Bluetooth specification Core_v4.1.pdf, page 2021 and page 2500). Bug: 18784040 Change-Id: I4f967a426ebb825731461e202c0741ae0540ef6a
-rw-r--r--btif/src/btif_gatt_client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/btif/src/btif_gatt_client.c b/btif/src/btif_gatt_client.c
index 084950d..5d37fec 100644
--- a/btif/src/btif_gatt_client.c
+++ b/btif/src/btif_gatt_client.c
@@ -1127,7 +1127,8 @@ static void btgattc_handle_event(uint16_t event, char* p_param)
// Check if RPA offloading is supported, otherwise, do not start
// background connection, since it will not connect after address
// changes
- if (BTM_BLE_IS_RESOLVE_BDA(p_cb->bd_addr.address))
+ if ((p_cb->addr_type == BLE_ADDR_RANDOM)
+ && BTM_BLE_IS_RESOLVE_BDA(p_cb->bd_addr.address))
{
tBTM_BLE_VSC_CB vnd_capabilities;
BTM_BleGetVendorCapabilities(&vnd_capabilities);