Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd0c04da authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Disable btif_gatt_check_encrypted_link." into tm-qpr-dev

parents 474f1049 281d294d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#include "btif_gatt.h"
#include "btif_storage.h"
#include "btif_util.h"
#include "gd/os/system_properties.h"
#include "osi/include/allocator.h"
#include "osi/include/osi.h"
#include "stack/btm/btm_sec.h"
@@ -75,6 +76,12 @@ 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) {
  static const bool check_encrypted = bluetooth::os::GetSystemPropertyBool(
      "bluetooth.gatt.check_encrypted_link.enabled", true);
  if (!check_encrypted) {
    LOG_DEBUG("Check skipped due to system config");
    return;
  }
  tBTM_LE_PENC_KEYS key;
  if ((btif_storage_get_ble_bonding_key(
           bd_addr, BTM_LE_KEY_PENC, (uint8_t*)&key,