Loading system/main/shim/acl.cc +0 −17 Original line number Diff line number Diff line Loading @@ -422,23 +422,6 @@ bluetooth::shim::legacy::Acl::Acl(os::Handler* handler, GetAclManager()->RegisterLeCallbacks(this, handler_); GetController()->RegisterCompletedMonitorAclPacketsCallback( handler->BindOn(this, &Acl::on_incoming_acl_credits)); // TODO(b/161543441): read the privacy policy from device-specific // configuration, and IRK from config file. hci::LeAddressManager::AddressPolicy address_policy = hci::LeAddressManager::AddressPolicy::USE_RESOLVABLE_ADDRESS; hci::AddressWithType empty_address_with_type( hci::Address{}, hci::AddressType::RANDOM_DEVICE_ADDRESS); crypto_toolbox::Octet16 rotation_irk = {0x44, 0xfb, 0x4b, 0x8d, 0x6c, 0x58, 0x21, 0x0c, 0xf9, 0x3d, 0xda, 0xf1, 0x64, 0xa3, 0xbb, 0x7f}; /* 7 minutes minimum, 15 minutes maximum for random address refreshing */ auto minimum_rotation_time = std::chrono::minutes(7); auto maximum_rotation_time = std::chrono::minutes(15); GetAclManager()->SetPrivacyPolicyForInitiatorAddress( address_policy, empty_address_with_type, rotation_irk, minimum_rotation_time, maximum_rotation_time); } bluetooth::shim::legacy::Acl::~Acl() { Loading system/stack/btm/btm_ble_gap.cc +4 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ #include "common/time_util.h" #include "device/include/controller.h" #include "main/shim/acl_api.h" #include "main/shim/btm_api.h" #include "main/shim/shim.h" #include "osi/include/log.h" Loading Loading @@ -618,6 +619,9 @@ bool BTM_BleConfigPrivacy(bool privacy_mode) { GAP_BleAttrDBUpdate(GATT_UUID_GAP_CENTRAL_ADDR_RESOL, &gap_ble_attr_value); if (bluetooth::shim::is_gd_acl_enabled()) { bluetooth::shim::ACL_ConfigureLePrivacy(privacy_mode); } return true; } Loading Loading
system/main/shim/acl.cc +0 −17 Original line number Diff line number Diff line Loading @@ -422,23 +422,6 @@ bluetooth::shim::legacy::Acl::Acl(os::Handler* handler, GetAclManager()->RegisterLeCallbacks(this, handler_); GetController()->RegisterCompletedMonitorAclPacketsCallback( handler->BindOn(this, &Acl::on_incoming_acl_credits)); // TODO(b/161543441): read the privacy policy from device-specific // configuration, and IRK from config file. hci::LeAddressManager::AddressPolicy address_policy = hci::LeAddressManager::AddressPolicy::USE_RESOLVABLE_ADDRESS; hci::AddressWithType empty_address_with_type( hci::Address{}, hci::AddressType::RANDOM_DEVICE_ADDRESS); crypto_toolbox::Octet16 rotation_irk = {0x44, 0xfb, 0x4b, 0x8d, 0x6c, 0x58, 0x21, 0x0c, 0xf9, 0x3d, 0xda, 0xf1, 0x64, 0xa3, 0xbb, 0x7f}; /* 7 minutes minimum, 15 minutes maximum for random address refreshing */ auto minimum_rotation_time = std::chrono::minutes(7); auto maximum_rotation_time = std::chrono::minutes(15); GetAclManager()->SetPrivacyPolicyForInitiatorAddress( address_policy, empty_address_with_type, rotation_irk, minimum_rotation_time, maximum_rotation_time); } bluetooth::shim::legacy::Acl::~Acl() { Loading
system/stack/btm/btm_ble_gap.cc +4 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ #include "common/time_util.h" #include "device/include/controller.h" #include "main/shim/acl_api.h" #include "main/shim/btm_api.h" #include "main/shim/shim.h" #include "osi/include/log.h" Loading Loading @@ -618,6 +619,9 @@ bool BTM_BleConfigPrivacy(bool privacy_mode) { GAP_BleAttrDBUpdate(GATT_UUID_GAP_CENTRAL_ADDR_RESOL, &gap_ble_attr_value); if (bluetooth::shim::is_gd_acl_enabled()) { bluetooth::shim::ACL_ConfigureLePrivacy(privacy_mode); } return true; } Loading