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

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

Add stack/acl/btm_pm::BTM_SetLinkPolicyActiveMode am: e9c079ae am: 44826b46

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8490b5fb43396b28da54149fa21f6c8e2e9b67be
parents 45b0f49d 44826b46
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -259,6 +259,20 @@ tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const RawAddress& remote_bda,
  return internal_.btm_pm_snd_md_req(*p_acl, pm_id, acl_ind, p_mode);
}

bool BTM_SetLinkPolicyActiveMode(const RawAddress& remote_bda) {
  tBTM_PM_PWR_MD settings;
  memset((void*)&settings, 0, sizeof(settings));
  settings.mode = BTM_PM_MD_ACTIVE;

  switch (BTM_SetPowerMode(BTM_PM_SET_ONLY_ID, remote_bda, &settings)) {
    case BTM_CMD_STORED:
    case BTM_SUCCESS:
      return true;
    default:
      return false;
  }
}

bool BTM_ReadPowerMode(const RawAddress& remote_bda, tBTM_PM_MODE* p_mode) {
  if (p_mode == nullptr) {
    LOG_ERROR("power mode is nullptr");
+1 −0
Original line number Diff line number Diff line
@@ -706,6 +706,7 @@ tBTM_STATUS BTM_PmRegister(uint8_t mask, uint8_t* p_pm_id,
 ******************************************************************************/
tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const RawAddress& remote_bda,
                             const tBTM_PM_PWR_MD* p_mode);
bool BTM_SetLinkPolicyActiveMode(const RawAddress& remote_bda);

/*******************************************************************************
 *