From: Andre Eisenbach Date: Wed, 14 Sep 2016 19:41:37 +0000 (-0700) Subject: Add security record for devices found through LE batch scan X-Git-Tag: android-x86-7.1-r1~32^2~9 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b4a5ec958fbea79dc4603b1f0a2497009bc59983;p=android-x86%2Fsystem-bt.git 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) --- diff --git a/stack/btm/btm_ble_batchscan.c b/stack/btm/btm_ble_batchscan.c index 95609ded3..2b329b534 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; }