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

Commit bf46d66f authored by Henri Chataing's avatar Henri Chataing Committed by Gerrit Code Review
Browse files

Merge "gd: Remove the IRedactableLoggable abstraction" into main

parents 8cb43d74 77e0da09
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -1472,7 +1472,8 @@ void bta_debug_av_dump(int fd) {
    if (lcb.addr.IsEmpty()) {
      continue;
    }
    dprintf(fd, "\n  Link control block: %zu peer: %s\n", i, ADDRESS_TO_LOGGABLE_CSTR(lcb.addr));
    dprintf(fd, "\n  Link control block: %zu peer: %s\n", i,
            lcb.addr.ToRedactedStringForLogging().c_str());
    dprintf(fd, "    Connected stream handle mask: 0x%x\n", lcb.conn_msk);
    dprintf(fd, "    Index(+1) to LCB: %d\n", lcb.lidx);
  }
@@ -1484,7 +1485,8 @@ void bta_debug_av_dump(int fd) {
    if (p_scb->PeerAddress().IsEmpty()) {
      continue;
    }
    dprintf(fd, "\n  BTA ID: %zu peer: %s\n", i, ADDRESS_TO_LOGGABLE_CSTR(p_scb->PeerAddress()));
    dprintf(fd, "\n  BTA ID: %zu peer: %s\n", i,
            p_scb->PeerAddress().ToRedactedStringForLogging().c_str());
    dprintf(fd, "    SDP discovery started: %s\n", p_scb->sdp_discovery_started ? "true" : "false");
    for (size_t j = 0; j < BTAV_A2DP_CODEC_INDEX_MAX; j++) {
      const tBTA_AV_SEP& sep = p_scb->seps[j];
@@ -1497,11 +1499,13 @@ void bta_debug_av_dump(int fd) {
      dprintf(fd, "      Codec: %s\n", A2DP_CodecName(sep.codec_info));
    }
    dprintf(fd, "    BTA info tag: %d\n", p_scb->q_tag);
    dprintf(fd, "    API Open peer: %s\n", ADDRESS_TO_LOGGABLE_CSTR(p_scb->q_info.open.bd_addr));
    dprintf(fd, "    API Open peer: %s\n",
            p_scb->q_info.open.bd_addr.ToRedactedStringForLogging().c_str());
    dprintf(fd, "      Use AVRCP: %s\n", p_scb->q_info.open.use_rc ? "true" : "false");
    dprintf(fd, "      Switch result: %d\n", p_scb->q_info.open.switch_res);
    dprintf(fd, "      Initiator UUID: 0x%x\n", p_scb->q_info.open.uuid);
    dprintf(fd, "    Saved API Open peer: %s\n", ADDRESS_TO_LOGGABLE_CSTR(p_scb->open_api.bd_addr));
    dprintf(fd, "    Saved API Open peer: %s\n",
            p_scb->open_api.bd_addr.ToRedactedStringForLogging().c_str());
    dprintf(fd, "      Use AVRCP: %s\n", p_scb->open_api.use_rc ? "true" : "false");
    dprintf(fd, "      Switch result: %d\n", p_scb->open_api.switch_res);
    dprintf(fd, "      Initiator UUID: 0x%x\n", p_scb->open_api.uuid);
+4 −3
Original line number Diff line number Diff line
@@ -752,14 +752,15 @@ public:
      for (auto& device : devices_) {
        if (!g->IsDeviceInTheGroup(device)) {
          if (device->GetExpectedGroupIdMember() == g->GetGroupId()) {
            stream << "        == candidate addr: " << ADDRESS_TO_LOGGABLE_STR(device->addr)
            stream << "        == candidate addr: " << device->addr.ToRedactedStringForLogging()
                   << "\n";
          }
          continue;
        }

        stream << "        == addr: " << ADDRESS_TO_LOGGABLE_STR(device->addr) << " ==\n"
               << "        csis instance: data:" << "\n";
        stream << "        == addr: " << device->addr.ToRedactedStringForLogging() << " ==\n"
               << "        csis instance: data:"
               << "\n";

        auto instance = device->GetCsisInstanceByGroupId(g->GetGroupId());
        if (!instance) {
+5 −5
Original line number Diff line number Diff line
@@ -920,7 +920,7 @@ void bta_gatt_client_dump(int fd) {
    tBTA_GATTC_CONN* p_conn_track = &bta_gattc_cb.conn_track[i];
    if (p_conn_track->in_use) {
      entry_count++;
      stream << "  address: " << ADDRESS_TO_LOGGABLE_STR(p_conn_track->remote_bda);
      stream << "  address: " << p_conn_track->remote_bda.ToRedactedStringForLogging();
      stream << "\n";
    }
  }
@@ -934,7 +934,7 @@ void bta_gatt_client_dump(int fd) {
      continue;
    }
    entry_count++;
    stream << "  address: " << ADDRESS_TO_LOGGABLE_STR(p_bg_track->remote_bda)
    stream << "  address: " << p_bg_track->remote_bda.ToRedactedStringForLogging()
           << "  cif_mask: " << loghex(p_bg_track->cif_mask);
    stream << "\n";
  }
@@ -974,7 +974,7 @@ void bta_gatt_client_dump(int fd) {
      }
      entry_count++;
      stream << "  conn_id: " << loghex(p_clcb->bta_conn_id)
             << "  address: " << ADDRESS_TO_LOGGABLE_STR(p_clcb->bda)
             << "  address: " << p_clcb->bda.ToRedactedStringForLogging()
             << "  transport: " << bt_transport_text(p_clcb->transport)
             << "  state: " << bta_clcb_state_text(p_clcb->state);
      stream << "\n";
@@ -988,7 +988,7 @@ void bta_gatt_client_dump(int fd) {
      }
      entry_count++;
      stream << "  conn_id: " << loghex(p_clcb->bta_conn_id)
             << "  address: " << ADDRESS_TO_LOGGABLE_STR(p_clcb->bda)
             << "  address: " << p_clcb->bda.ToRedactedStringForLogging()
             << "  transport: " << bt_transport_text(p_clcb->transport)
             << "  state: " << bta_clcb_state_text(p_clcb->state);
      stream << "\n";
@@ -1004,7 +1004,7 @@ void bta_gatt_client_dump(int fd) {
      continue;
    }
    entry_count++;
    stream << "  server_address: " << ADDRESS_TO_LOGGABLE_STR(p_known_server->server_bda)
    stream << "  server_address: " << p_known_server->server_bda.ToRedactedStringForLogging()
           << "  mtu: " << p_known_server->mtu
           << "  blocked_conn_id: " << loghex(p_known_server->blocked_conn_id)
           << "  num_clcb: " << +p_known_server->num_clcb
+1 −1
Original line number Diff line number Diff line
@@ -383,7 +383,7 @@ std::ostream& operator<<(std::ostream& out, bluetooth::groups::DeviceGroup const
      << "      Uuid: " << group.group_uuid_ << std::endl;
  out << "      Devices:\n";
  for (auto const& addr : group.devices_) {
    out << "        " << ADDRESS_TO_LOGGABLE_STR(addr) << std::endl;
    out << "        " << addr.ToRedactedStringForLogging() << std::endl;
  }
  return out;
}
+1 −1
Original line number Diff line number Diff line
@@ -236,7 +236,7 @@ std::ostream& operator<<(std::ostream& out, const HasCtpOp& op) {
  if (std::holds_alternative<int>(op.addr_or_group)) {
    out << "\"group_id\": " << std::get<int>(op.addr_or_group);
  } else if (std::holds_alternative<RawAddress>(op.addr_or_group)) {
    out << "\"address\": \"" << ADDRESS_TO_LOGGABLE_STR(std::get<RawAddress>(op.addr_or_group))
    out << "\"address\": \"" << std::get<RawAddress>(op.addr_or_group).ToRedactedStringForLogging()
        << "\"";
  } else {
    out << "\"bad value\"";
Loading