Loading system/btif/src/btif_gatt_util.cc +10 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ #include "osi/include/allocator.h" #include "osi/include/osi.h" #include "stack/btm/btm_sec.h" #include "stack/include/acl_api.h" #include "types/bluetooth/uuid.h" #include "types/bt_transport.h" #include "types/raw_address.h" Loading Loading @@ -76,6 +77,15 @@ static void btif_gatt_set_encryption_cb(UNUSED_ATTR const RawAddress& bd_addr, void btif_gatt_check_encrypted_link(RawAddress bd_addr, tBT_TRANSPORT transport_link) { RawAddress raw_local_addr; tBLE_ADDR_TYPE local_addr_type; BTM_ReadConnectionAddr(bd_addr, raw_local_addr, &local_addr_type); tBLE_BD_ADDR local_addr{local_addr_type, raw_local_addr}; if (!local_addr.IsPublic() && !local_addr.IsAddressResolvable()) { LOG_DEBUG("Not establishing encryption since address type is NRPA"); return; } static const bool check_encrypted = bluetooth::os::GetSystemPropertyBool( "bluetooth.gatt.check_encrypted_link.enabled", true); if (!check_encrypted) { Loading Loading
system/btif/src/btif_gatt_util.cc +10 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ #include "osi/include/allocator.h" #include "osi/include/osi.h" #include "stack/btm/btm_sec.h" #include "stack/include/acl_api.h" #include "types/bluetooth/uuid.h" #include "types/bt_transport.h" #include "types/raw_address.h" Loading Loading @@ -76,6 +77,15 @@ static void btif_gatt_set_encryption_cb(UNUSED_ATTR const RawAddress& bd_addr, void btif_gatt_check_encrypted_link(RawAddress bd_addr, tBT_TRANSPORT transport_link) { RawAddress raw_local_addr; tBLE_ADDR_TYPE local_addr_type; BTM_ReadConnectionAddr(bd_addr, raw_local_addr, &local_addr_type); tBLE_BD_ADDR local_addr{local_addr_type, raw_local_addr}; if (!local_addr.IsPublic() && !local_addr.IsAddressResolvable()) { LOG_DEBUG("Not establishing encryption since address type is NRPA"); return; } static const bool check_encrypted = bluetooth::os::GetSystemPropertyBool( "bluetooth.gatt.check_encrypted_link.enabled", true); if (!check_encrypted) { Loading