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

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

9/10 Unfriend bta::dm::tBTA_DM_PEER_DEVICE am: 4f101f30

parents 294bb04c 4f101f30
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -2704,10 +2704,11 @@ static void handle_role_change(const RawAddress& bd_addr, tHCI_ROLE new_role,
  }

  LOG_INFO(
      "Role change callback peer:%s info:0x%x new_role:%s dev count:%d "
      "Role change callback peer:%s info:%s new_role:%s dev count:%d "
      "hci_status:%s",
      ADDRESS_TO_LOGGABLE_CSTR(bd_addr), p_dev->Info(), RoleText(new_role).c_str(),
      bta_dm_cb.device_list.count, hci_error_code_text(hci_status).c_str());
      ADDRESS_TO_LOGGABLE_CSTR(bd_addr), p_dev->info_text().c_str(),
      RoleText(new_role).c_str(), bta_dm_cb.device_list.count,
      hci_error_code_text(hci_status).c_str());

  if (p_dev->is_av_active()) {
    bool need_policy_change = false;
@@ -2955,8 +2956,8 @@ static void bta_dm_check_av() {
    LOG_INFO("av_count:%d", bta_dm_cb.cur_av_count);
    for (i = 0; i < bta_dm_cb.device_list.count; i++) {
      p_dev = &bta_dm_cb.device_list.peer_device[i];
      APPL_TRACE_WARNING("[%d]: state:%d, info:x%x", i, p_dev->conn_state,
                         p_dev->Info());
      APPL_TRACE_WARNING("[%d]: state:%d, info:%s", i, p_dev->conn_state,
                         p_dev->info_text().c_str());
      if ((p_dev->conn_state == BTA_DM_CONNECTED) && p_dev->is_av_active()) {
        /* make central and take away the role switch policy */
        BTM_SwitchRoleToCentral(p_dev->peer_bdaddr);
+2 −0
Original line number Diff line number Diff line
@@ -264,6 +264,8 @@ struct tBTA_DM_PEER_DEVICE {
  tBTA_DM_DEV_INFO info{BTA_DM_DI_NONE};

 public:
  std::string info_text() const { return device_info_text(info); }

  tBTA_DM_DEV_INFO Info() const { return info; }
  void reset_device_info() { info = BTA_DM_DI_NONE; }

+3 −3
Original line number Diff line number Diff line
@@ -372,7 +372,7 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, const tBTA_SYS_ID id,

  p_dev = bta_dm_find_peer_device(peer_addr);
  if (p_dev) {
    LOG_DEBUG("Device info:%s", device_info_text(p_dev->Info()).c_str());
    LOG_DEBUG("Device info:%s", p_dev->info_text().c_str());
  } else {
    LOG_ERROR("Unable to find peer device...yet soldiering on...");
  }
@@ -778,9 +778,9 @@ void bta_dm_pm_sniff(tBTA_DM_PEER_DEVICE* p_peer_dev, uint8_t index) {
             ADDRESS_TO_LOGGABLE_CSTR(p_peer_dev->peer_bdaddr));
  }
  tBTM_PM_STATUS mode_status = static_cast<tBTM_PM_STATUS>(mode);
  LOG_DEBUG("Current power mode:%s[0x%x] peer_info:%s[0x%02x]",
  LOG_DEBUG("Current power mode:%s[0x%x] peer_info:%s",
            power_mode_status_text(mode_status).c_str(), mode_status,
            device_info_text(p_peer_dev->Info()).c_str(), p_peer_dev->Info());
            p_peer_dev->info_text().c_str());

  uint8_t* p_rem_feat = BTM_ReadRemoteFeatures(p_peer_dev->peer_bdaddr);