summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Eisenbach <eisenbach@google.com>2016-09-14 12:41:37 -0700
committerAndre Eisenbach <eisenbach@google.com>2016-09-15 17:27:38 -0700
commitb4a5ec958fbea79dc4603b1f0a2497009bc59983 (patch)
treed29c7ee312cf71e37c61fc5222f08390ad60d47d
parenta1e4dd95ea389036c9e59872de09059726723fb4 (diff)
downloadandroid-system-bt-b4a5ec958fbea79dc4603b1f0a2497009bc59983.tar.gz
android-system-bt-b4a5ec958fbea79dc4603b1f0a2497009bc59983.tar.xz
Add security record for devices found through LE batch scan
Currently, starting an LE batch scan are not added to the stack internal device database, which means that the address type and device type needed for a connection are not available. This patch ensures that devices found during an LE scan are added to the device database to ensure connection attempts will succeed. Bug: 31309376 Change-Id: Ic52d7eaa03d17dcbbd848af9140038bc84ea3bd0 (cherry picked from commit e0295e2c2eb7cc6eb331d581ed8455d6b30b3bc6)
-rw-r--r--stack/btm/btm_ble_batchscan.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stack/btm/btm_ble_batchscan.c b/stack/btm/btm_ble_batchscan.c
index 95609de..2b329b5 100644
--- a/stack/btm/btm_ble_batchscan.c
+++ b/stack/btm/btm_ble_batchscan.c
@@ -123,6 +123,10 @@ void btm_ble_batchscan_filter_track_adv_vse_cback(UINT8 len, UINT8 *p)
BTM_TRACE_EVENT("track_adv_vse_cback called: %d, %d, %d", adv_data.filt_index,
adv_data.addr_type, adv_data.advertiser_state);
+
+ // Make sure the device is known
+ BTM_SecAddBleDevice(adv_data.bd_addr.address, NULL, BT_DEVICE_TYPE_BLE, adv_data.addr_type);
+
ble_advtrack_cb.p_track_cback(&adv_data);
return;
}