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

Commit a1807224 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Add StackAclBtmPm::btm_pm_get_power_manager_from_address am: 4915177b

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1527464

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I60bdce61fb808dae7c14865243d62e63152cceae
parents cf9fc8a5 4915177b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -50,7 +50,9 @@
struct StackAclBtmPm {
  tBTM_STATUS btm_pm_snd_md_req(uint8_t pm_id, int link_ind,
                                const tBTM_PM_PWR_MD* p_mode);
  tBTM_PM_MCB* btm_pm_get_power_manager_from_address(const RawAddress& bda);
};

namespace {
StackAclBtmPm internal_;
}
@@ -557,6 +559,13 @@ tBTM_STATUS StackAclBtmPm::btm_pm_snd_md_req(uint8_t pm_id, int link_ind,
  return BTM_CMD_STARTED;
}

tBTM_PM_MCB* StackAclBtmPm::btm_pm_get_power_manager_from_address(
    const RawAddress& bda) {
  int acl_index = btm_pm_find_acl_ind(bda);
  if (acl_index == MAX_L2CAP_LINKS) return nullptr;
  return &(btm_cb.acl_cb_.pm_mode_db[acl_index]);
}

/*******************************************************************************
 *
 * Function         btm_pm_proc_cmd_status