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

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

Re-log btif/src/btif_hf::HeadsetInterface::PhoneStateChange am: f8ef55af

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I91f0915ce7fef5e97b2b4cb79c1c727af116b4cc
parents bafe3a34 f8ef55af
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#include "btif_profile_queue.h"
#include "btif_util.h"
#include "common/metrics.h"
#include "main/shim/dumpsys.h"

namespace bluetooth {
namespace headset {
@@ -1079,13 +1080,13 @@ bt_status_t HeadsetInterface::PhoneStateChange(
    RawAddress* bd_addr) {
  CHECK_BTHF_INIT();
  if (!bd_addr) {
    BTIF_TRACE_WARNING("%s: bd_addr is null", __func__);
    LOG_WARN("bd_addr is null");
    return BT_STATUS_FAIL;
  }
  const RawAddress raw_address(*bd_addr);
  int idx = btif_hf_idx_by_bdaddr(bd_addr);
  if (idx < 0 || idx > BTA_AG_MAX_NUM_CLIENTS) {
    BTIF_TRACE_WARNING("%s: invalid index %d for %s", __func__, idx,
                       bd_addr->ToString().c_str());
    LOG_WARN("Invalid index %d for %s", idx, PRIVATE_ADDRESS(raw_address));
    return BT_STATUS_FAIL;
  }
  const btif_hf_cb_t& control_block = btif_hf_cb[idx];