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

Commit 3beaa486 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

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

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

Change-Id: I6105d97f402e77cabe5e4fa913f1c1e6ec324dde
parents e756c9cd 98d0355d
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@
#include "device/include/controller.h"
#include "device/include/controller.h"
#include "l2c_api.h"
#include "l2c_api.h"
#include "main/shim/btm_api.h"
#include "main/shim/btm_api.h"
#include "main/shim/dumpsys.h"
#include "main/shim/shim.h"
#include "main/shim/shim.h"
#include "osi/include/allocator.h"
#include "osi/include/allocator.h"
#include "osi/include/compat.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) ||
  if (BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_LE) ||
      BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_BR_EDR)) {
      BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_BR_EDR)) {
    BTM_TRACE_WARNING("%s FAILED: Cannot Delete when connection is active",
    LOG_WARN("%s FAILED: Cannot Delete when connection to %s is active",
                      __func__);
             __func__, PRIVATE_ADDRESS(bd_addr));
    return false;
    return false;
  }
  }


@@ -165,6 +166,10 @@ bool BTM_SecDeleteDevice(const RawAddress& bd_addr) {
    wipe_secrets_and_remove(p_dev_rec);
    wipe_secrets_and_remove(p_dev_rec);
    /* Tell controller to get rid of the link key, if it has one stored */
    /* Tell controller to get rid of the link key, if it has one stored */
    BTM_DeleteStoredLinkKey(&bda, NULL);
    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;
  return true;