Loading sysprop/ble.sysprop +16 −0 Original line number Diff line number Diff line Loading @@ -8,3 +8,19 @@ prop { access: Readonly prop_name: "bluetooth.ble.vnd.included" } prop { api_name: "random_address_rotation_interval_min" type: Integer scope: Internal access: Readonly prop_name: "bluetooth.ble.random_address_rotation_interval_min" } prop { api_name: "random_address_rotation_interval_max" type: Integer scope: Internal access: Readonly prop_name: "bluetooth.ble.random_address_rotation_interval_max" } system/gd/Android.bp +7 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,7 @@ cc_defaults { "libbt-platform-protos-lite", "libbt_shim_bridge", "libbt_shim_ffi", "libcom.android.sysprop.bluetooth.wrapped", "libosi", "server_configurable_flags", ], Loading Loading @@ -318,10 +319,12 @@ cc_binary { "libbt_shim_bridge", "libbt_shim_ffi", "libchrome", "libcom.android.sysprop.bluetooth.wrapped", "libflatbuffers-cpp", "libosi", ], shared_libs: [ "libPlatformProperties", "libcrypto", "libgrpc++", "libgrpc_wrap", Loading Loading @@ -449,12 +452,14 @@ cc_test { "libbt_shim_ffi", "libc++fs", "libchrome", "libcom.android.sysprop.bluetooth.wrapped", "libflagtest", "libflatbuffers-cpp", "libgmock", "libosi", ], shared_libs: [ "libPlatformProperties", "libbase", "libcrypto", "server_configurable_flags", Loading Loading @@ -583,6 +588,7 @@ cc_defaults { "libbt_shim_bridge", "libbt_shim_ffi", "libchrome", "libcom.android.sysprop.bluetooth.wrapped", "libgmock", "libgtest", "libosi", Loading @@ -592,6 +598,7 @@ cc_defaults { "BluetoothGeneratedDumpsysDataSchema_h", ], shared_libs: [ "libPlatformProperties", "libbase", "libcrypto", "libgrpc++", Loading system/gd/security/internal/security_manager_impl.cc +8 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ */ #include "security_manager_impl.h" #include <android_bluetooth_sysprop.h> #include "common/bind.h" #include "hci/address_with_type.h" #include "hci/octets.h" Loading Loading @@ -109,9 +111,12 @@ void SecurityManagerImpl::Init() { hci::LeAddressManager::AddressPolicy address_policy = hci::LeAddressManager::AddressPolicy::USE_RESOLVABLE_ADDRESS; hci::AddressWithType address_with_type(hci::Address{}, hci::AddressType::RANDOM_DEVICE_ADDRESS); /* 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); /* Default to 7 minutes minimum, 15 minutes maximum for random address refreshing; * device can override. */ auto minimum_rotation_time = std::chrono::minutes( GET_SYSPROP(Ble, random_address_rotation_interval_min, 7)); auto maximum_rotation_time = std::chrono::minutes( GET_SYSPROP(Ble, random_address_rotation_interval_max, 15)); acl_manager_->SetPrivacyPolicyForInitiatorAddress( address_policy, address_with_type, minimum_rotation_time, maximum_rotation_time); Loading system/main/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,7 @@ cc_test { "libbt_shim_ffi", "libbtdevice", "libchrome", "libcom.android.sysprop.bluetooth.wrapped", "libevent", "libflatbuffers-cpp", "libgmock", Loading @@ -226,6 +227,7 @@ cc_test { "libosi", ], shared_libs: [ "libPlatformProperties", "libcrypto", "server_configurable_flags", ], Loading Loading
sysprop/ble.sysprop +16 −0 Original line number Diff line number Diff line Loading @@ -8,3 +8,19 @@ prop { access: Readonly prop_name: "bluetooth.ble.vnd.included" } prop { api_name: "random_address_rotation_interval_min" type: Integer scope: Internal access: Readonly prop_name: "bluetooth.ble.random_address_rotation_interval_min" } prop { api_name: "random_address_rotation_interval_max" type: Integer scope: Internal access: Readonly prop_name: "bluetooth.ble.random_address_rotation_interval_max" }
system/gd/Android.bp +7 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,7 @@ cc_defaults { "libbt-platform-protos-lite", "libbt_shim_bridge", "libbt_shim_ffi", "libcom.android.sysprop.bluetooth.wrapped", "libosi", "server_configurable_flags", ], Loading Loading @@ -318,10 +319,12 @@ cc_binary { "libbt_shim_bridge", "libbt_shim_ffi", "libchrome", "libcom.android.sysprop.bluetooth.wrapped", "libflatbuffers-cpp", "libosi", ], shared_libs: [ "libPlatformProperties", "libcrypto", "libgrpc++", "libgrpc_wrap", Loading Loading @@ -449,12 +452,14 @@ cc_test { "libbt_shim_ffi", "libc++fs", "libchrome", "libcom.android.sysprop.bluetooth.wrapped", "libflagtest", "libflatbuffers-cpp", "libgmock", "libosi", ], shared_libs: [ "libPlatformProperties", "libbase", "libcrypto", "server_configurable_flags", Loading Loading @@ -583,6 +588,7 @@ cc_defaults { "libbt_shim_bridge", "libbt_shim_ffi", "libchrome", "libcom.android.sysprop.bluetooth.wrapped", "libgmock", "libgtest", "libosi", Loading @@ -592,6 +598,7 @@ cc_defaults { "BluetoothGeneratedDumpsysDataSchema_h", ], shared_libs: [ "libPlatformProperties", "libbase", "libcrypto", "libgrpc++", Loading
system/gd/security/internal/security_manager_impl.cc +8 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ */ #include "security_manager_impl.h" #include <android_bluetooth_sysprop.h> #include "common/bind.h" #include "hci/address_with_type.h" #include "hci/octets.h" Loading Loading @@ -109,9 +111,12 @@ void SecurityManagerImpl::Init() { hci::LeAddressManager::AddressPolicy address_policy = hci::LeAddressManager::AddressPolicy::USE_RESOLVABLE_ADDRESS; hci::AddressWithType address_with_type(hci::Address{}, hci::AddressType::RANDOM_DEVICE_ADDRESS); /* 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); /* Default to 7 minutes minimum, 15 minutes maximum for random address refreshing; * device can override. */ auto minimum_rotation_time = std::chrono::minutes( GET_SYSPROP(Ble, random_address_rotation_interval_min, 7)); auto maximum_rotation_time = std::chrono::minutes( GET_SYSPROP(Ble, random_address_rotation_interval_max, 15)); acl_manager_->SetPrivacyPolicyForInitiatorAddress( address_policy, address_with_type, minimum_rotation_time, maximum_rotation_time); Loading
system/main/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,7 @@ cc_test { "libbt_shim_ffi", "libbtdevice", "libchrome", "libcom.android.sysprop.bluetooth.wrapped", "libevent", "libflatbuffers-cpp", "libgmock", Loading @@ -226,6 +227,7 @@ cc_test { "libosi", ], shared_libs: [ "libPlatformProperties", "libcrypto", "server_configurable_flags", ], Loading