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

Commit 874c27d1 authored by Ryo Hashimoto's avatar Ryo Hashimoto Committed by Omair Kamil
Browse files

Pass appropriate types to base::StringPrintf

Bug: 367200458
Flag: EXEMPT, no logical change
Test: mmm packages/modules/Bluetooth
Change-Id: Ib70bd61002be56a52f29658e86dd5dab0aa5ac30
parent bb017b59
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -342,11 +342,12 @@ static void bta_dm_inq_cmpl() {
}

static void bta_dm_remote_name_cmpl(const tBTA_DM_REMOTE_NAME& remote_name_msg) {
  BTM_LogHistory(kBtmLogTag, remote_name_msg.bd_addr, "Remote name completed",
  BTM_LogHistory(
          kBtmLogTag, remote_name_msg.bd_addr, "Remote name completed",
          base::StringPrintf("status:%s state:%s name:\"%s\"",
                             hci_status_code_text(remote_name_msg.hci_status).c_str(),
                             bta_dm_state_text(bta_dm_search_get_state()).c_str(),
                                    PRIVATE_NAME(remote_name_msg.bd_name)));
                             PRIVATE_NAME(reinterpret_cast<char const*>(remote_name_msg.bd_name))));

  tBTM_INQ_INFO* p_btm_inq_info =
          get_btm_client_interface().db.BTM_InqDbRead(remote_name_msg.bd_addr);
+4 −2
Original line number Diff line number Diff line
@@ -972,7 +972,8 @@ static void btif_dm_pin_req_evt(tBTA_DM_PIN_REQ* p_pin_req) {
    }
  }
  BTM_LogHistory(kBtmLogTagCallback, bd_addr, "Pin request",
                 base::StringPrintf("name:\"%s\" min16:%c", PRIVATE_NAME(bd_name.name),
                 base::StringPrintf("name:\"%s\" min16:%c",
                                    PRIVATE_NAME(reinterpret_cast<char const*>(bd_name.name)),
                                    (p_pin_req->min_16_digit) ? 'T' : 'F'));
  GetInterfaceToProfiles()->events->invoke_pin_request_cb(bd_addr, bd_name, cod,
                                                          p_pin_req->min_16_digit);
@@ -3536,7 +3537,8 @@ static void btif_dm_ble_passkey_req_evt(tBTA_DM_PIN_REQ* p_pin_req) {
  cod = COD_UNCLASSIFIED;

  BTM_LogHistory(kBtmLogTagCallback, bd_addr, "PIN request",
                 base::StringPrintf("name:'%s'", PRIVATE_NAME(bd_name.name)));
                 base::StringPrintf("name:'%s'",
                                    PRIVATE_NAME(reinterpret_cast<char const*>(bd_name.name))));

  GetInterfaceToProfiles()->events->invoke_pin_request_cb(bd_addr, bd_name, cod, false);
}
+1 −1
Original line number Diff line number Diff line
@@ -2159,7 +2159,7 @@ tBTM_SEC_DEV_REC* btm_rnr_add_name_to_security_record(const RawAddress* p_bd_add
  BTM_LogHistory(
          kBtmLogTag, (p_bd_addr) ? *p_bd_addr : RawAddress::kEmpty, "RNR complete",
          base::StringPrintf("hci_status:%s name:%s", hci_error_code_text(hci_status).c_str(),
                             PRIVATE_NAME(p_bd_name)));
                             PRIVATE_NAME(reinterpret_cast<char const*>(p_bd_name))));

  if (p_dev_rec == nullptr) {
    // We need to send the callbacks to complete the RNR cycle despite failure
+2 −2
Original line number Diff line number Diff line
@@ -338,8 +338,8 @@ public:
            "sec_prop:%s",
            ADDRESS_TO_LOGGABLE_CSTR(bd_addr), DeviceTypeText(device_type).c_str(),
            dev_class_text(dev_class).c_str(), remote_version_info.ToString().c_str(), sm4,
            (remote_supports_secure_connections) ? 'T' : 'F', PRIVATE_NAME(sec_bd_name),
            sec_rec.ToString().c_str());
            (remote_supports_secure_connections) ? 'T' : 'F',
            PRIVATE_NAME(reinterpret_cast<char const*>(sec_bd_name)), sec_rec.ToString().c_str());
  }

public: