Loading system/bta/dm/bta_dm_act.cc +3 −4 Original line number Diff line number Diff line Loading @@ -607,12 +607,11 @@ void bta_dm_add_device(std::unique_ptr<tBTA_DM_API_ADD_DEVICE> msg) { if (msg->link_key_known) p_lc = &msg->link_key; if (bluetooth::shim::is_gd_security_enabled()) { bluetooth::shim::BTM_SecAddDevice(msg->bd_addr, p_dc, msg->bd_name, msg->features, p_lc, msg->key_type, msg->pin_length); bluetooth::shim::BTM_SecAddDevice(msg->bd_addr, p_dc, msg->bd_name, nullptr, p_lc, msg->key_type, msg->pin_length); } else { auto add_result = BTM_SecAddDevice(msg->bd_addr, p_dc, msg->bd_name, msg->features, p_lc, BTM_SecAddDevice(msg->bd_addr, p_dc, msg->bd_name, nullptr, p_lc, msg->key_type, msg->pin_length); if (!add_result) { LOG(ERROR) << "BTA_DM: Error adding device " << msg->bd_addr; Loading system/bta/dm/bta_dm_api.cc +0 −1 Original line number Diff line number Diff line Loading @@ -241,7 +241,6 @@ void BTA_DmAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class, } memset(msg->bd_name, 0, BD_NAME_LEN + 1); memset(msg->features, 0, sizeof(msg->features)); msg->pin_length = pin_length; do_in_main_thread(FROM_HERE, Loading system/bta/dm/bta_dm_int.h +0 −2 Original line number Diff line number Diff line Loading @@ -127,8 +127,6 @@ typedef struct { bool link_key_known; bool dc_known; BD_NAME bd_name; uint8_t features[HCI_FEATURE_BYTES_PER_PAGE * (HCI_EXT_FEATURES_PAGE_MAX + 1)]; uint8_t pin_length; } tBTA_DM_API_ADD_DEVICE; Loading system/stack/acl/acl.h +1 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ typedef struct { } public: bool is_encrypted = false; uint8_t link_role; uint8_t lmp_version; uint8_t switch_role_failed_attempts; Loading system/stack/acl/btm_acl.cc +3 −4 Original line number Diff line number Diff line Loading @@ -576,10 +576,7 @@ tBTM_STATUS BTM_SwitchRole(const RawAddress& remote_bd_addr, uint8_t new_role) { } /* some devices do not support switch while encryption is on */ else { tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(remote_bd_addr); if ((p_dev_rec != NULL) && ((p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED) != 0) && !BTM_EPR_AVAILABLE(p_acl)) { if (p_acl->is_encrypted && !BTM_EPR_AVAILABLE(p_acl)) { /* bypass turning off encryption if change link key is already doing it */ p_acl->set_encryption_off(); p_acl->set_switch_role_encryption_off(); Loading Loading @@ -617,6 +614,8 @@ void btm_acl_encrypt_change(uint16_t handle, uint8_t status, else return; p->is_encrypted = encr_enable; /* Process Role Switch if active */ if (p->is_switch_role_encryption_off()) { /* if encryption turn off failed we still will try to switch role */ Loading Loading
system/bta/dm/bta_dm_act.cc +3 −4 Original line number Diff line number Diff line Loading @@ -607,12 +607,11 @@ void bta_dm_add_device(std::unique_ptr<tBTA_DM_API_ADD_DEVICE> msg) { if (msg->link_key_known) p_lc = &msg->link_key; if (bluetooth::shim::is_gd_security_enabled()) { bluetooth::shim::BTM_SecAddDevice(msg->bd_addr, p_dc, msg->bd_name, msg->features, p_lc, msg->key_type, msg->pin_length); bluetooth::shim::BTM_SecAddDevice(msg->bd_addr, p_dc, msg->bd_name, nullptr, p_lc, msg->key_type, msg->pin_length); } else { auto add_result = BTM_SecAddDevice(msg->bd_addr, p_dc, msg->bd_name, msg->features, p_lc, BTM_SecAddDevice(msg->bd_addr, p_dc, msg->bd_name, nullptr, p_lc, msg->key_type, msg->pin_length); if (!add_result) { LOG(ERROR) << "BTA_DM: Error adding device " << msg->bd_addr; Loading
system/bta/dm/bta_dm_api.cc +0 −1 Original line number Diff line number Diff line Loading @@ -241,7 +241,6 @@ void BTA_DmAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class, } memset(msg->bd_name, 0, BD_NAME_LEN + 1); memset(msg->features, 0, sizeof(msg->features)); msg->pin_length = pin_length; do_in_main_thread(FROM_HERE, Loading
system/bta/dm/bta_dm_int.h +0 −2 Original line number Diff line number Diff line Loading @@ -127,8 +127,6 @@ typedef struct { bool link_key_known; bool dc_known; BD_NAME bd_name; uint8_t features[HCI_FEATURE_BYTES_PER_PAGE * (HCI_EXT_FEATURES_PAGE_MAX + 1)]; uint8_t pin_length; } tBTA_DM_API_ADD_DEVICE; Loading
system/stack/acl/acl.h +1 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ typedef struct { } public: bool is_encrypted = false; uint8_t link_role; uint8_t lmp_version; uint8_t switch_role_failed_attempts; Loading
system/stack/acl/btm_acl.cc +3 −4 Original line number Diff line number Diff line Loading @@ -576,10 +576,7 @@ tBTM_STATUS BTM_SwitchRole(const RawAddress& remote_bd_addr, uint8_t new_role) { } /* some devices do not support switch while encryption is on */ else { tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(remote_bd_addr); if ((p_dev_rec != NULL) && ((p_dev_rec->sec_flags & BTM_SEC_ENCRYPTED) != 0) && !BTM_EPR_AVAILABLE(p_acl)) { if (p_acl->is_encrypted && !BTM_EPR_AVAILABLE(p_acl)) { /* bypass turning off encryption if change link key is already doing it */ p_acl->set_encryption_off(); p_acl->set_switch_role_encryption_off(); Loading Loading @@ -617,6 +614,8 @@ void btm_acl_encrypt_change(uint16_t handle, uint8_t status, else return; p->is_encrypted = encr_enable; /* Process Role Switch if active */ if (p->is_switch_role_encryption_off()) { /* if encryption turn off failed we still will try to switch role */ Loading