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

Commit 98d0355d authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "BTM: Log BTM_SecDeleteDevice()" am: d10b0b4b

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1908056

Change-Id: I363a02e94db1ba63eb9885f53d671cdc49ea778f
parents 486e89aa d10b0b4b
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include "device/include/controller.h"
#include "l2c_api.h"
#include "main/shim/btm_api.h"
#include "main/shim/dumpsys.h"
#include "main/shim/shim.h"
#include "osi/include/allocator.h"
#include "osi/include/compat.h"
@@ -151,8 +152,8 @@ bool BTM_SecDeleteDevice(const RawAddress& bd_addr) {

  if (BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_LE) ||
      BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_BR_EDR)) {
    BTM_TRACE_WARNING("%s FAILED: Cannot Delete when connection is active",
                      __func__);
    LOG_WARN("%s FAILED: Cannot Delete when connection to %s is active",
             __func__, PRIVATE_ADDRESS(bd_addr));
    return false;
  }

@@ -165,6 +166,10 @@ bool BTM_SecDeleteDevice(const RawAddress& bd_addr) {
    wipe_secrets_and_remove(p_dev_rec);
    /* Tell controller to get rid of the link key, if it has one stored */
    BTM_DeleteStoredLinkKey(&bda, NULL);
    LOG_INFO("%s %s complete", __func__, PRIVATE_ADDRESS(bd_addr));
  } else {
    LOG_WARN("%s Unable to delete link key for unknown device %s", __func__,
             PRIVATE_ADDRESS(bd_addr));
  }

  return true;