• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

Revisión311ebcedb355a014b8654227cb21d7019c356c7e (tree)
Tiempo2019-07-23 21:06:30
AutorUgo Yu <ugoyu@goog...>
CommiterUgo Yu

Log Message

Store BLE keys using the address from the ble_auth_cmpl_evt

Reading the peer address from btif_dm_ble_auth_cmpl_evt, instead
of using the value from the pairing control block in
btif_dm_save_ble_bonding_keys, ensures that BLE keys are stored with
the correct address.

Bug: 133234174
Bug: 79703832
Test: 1. Initiate crosskey pairing from BLE

      1. Check whether BLE keys are stored correctly

Change-Id: I18b4a1d8e2cdcd6dd4a300f1dc9e6d3892a3baff

Cambiar Resumen

Diferencia incremental

--- a/btif/include/btif_dm.h
+++ b/btif/include/btif_dm.h
@@ -100,7 +100,7 @@ void btif_dm_load_ble_local_keys(void);
100100 void btif_dm_get_ble_local_keys(tBTA_DM_BLE_LOCAL_KEY_MASK* p_key_mask,
101101 Octet16* p_er,
102102 tBTA_BLE_LOCAL_ID_KEYS* p_id_keys);
103-void btif_dm_save_ble_bonding_keys(void);
103+void btif_dm_save_ble_bonding_keys(RawAddress& bd_addr);
104104 void btif_dm_remove_ble_bonding_keys(void);
105105 void btif_dm_ble_sec_req_evt(tBTA_DM_BLE_SEC_REQ* p_ble_req);
106106
--- a/btif/src/btif_dm.cc
+++ b/btif/src/btif_dm.cc
@@ -2883,7 +2883,7 @@ static void btif_dm_ble_auth_cmpl_evt(tBTA_DM_AUTH_CMPL* p_auth_cmpl) {
28832883 btif_storage_remove_bonded_device(&bdaddr);
28842884 state = BT_BOND_STATE_NONE;
28852885 } else {
2886- btif_dm_save_ble_bonding_keys();
2886+ btif_dm_save_ble_bonding_keys(bdaddr);
28872887 btif_dm_get_remote_services_by_transport(&bd_addr, GATT_TRANSPORT_LE);
28882888 }
28892889 } else {
@@ -2964,11 +2964,9 @@ void btif_dm_get_ble_local_keys(tBTA_DM_BLE_LOCAL_KEY_MASK* p_key_mask,
29642964 BTIF_TRACE_DEBUG("%s *p_key_mask=0x%02x", __func__, *p_key_mask);
29652965 }
29662966
2967-void btif_dm_save_ble_bonding_keys(void) {
2967+void btif_dm_save_ble_bonding_keys(RawAddress& bd_addr) {
29682968 BTIF_TRACE_DEBUG("%s", __func__);
29692969
2970- RawAddress bd_addr = pairing_cb.bd_addr;
2971-
29722970 if (pairing_cb.ble.is_penc_key_rcvd) {
29732971 btif_storage_add_ble_bonding_key(
29742972 &bd_addr, (uint8_t*)&pairing_cb.ble.penc_key, BTIF_DM_LE_KEY_PENC,