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

Commit 9b587b39 authored by Chris Manton's avatar Chris Manton
Browse files

Add stack/btm/security_device_record::ToString

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I9e6c1e5865f1524854e8cc7ce3648d7e662d112e
parent ea124c79
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -18,9 +18,12 @@

#pragma once

#include <base/strings/stringprintf.h>
#include <cstdint>
#include <string>

#include "gd/crypto_toolbox/crypto_toolbox.h"
#include "main/shim/dumpsys.h"
#include "osi/include/alarm.h"
#include "stack/include/btm_api_types.h"
#include "types/raw_address.h"
@@ -355,4 +358,11 @@ typedef struct {
  tBTM_SEC_BLE ble;
  tBTM_LE_CONN_PRAMS conn_params;

  std::string ToString() const {
    return base::StringPrintf(
        "%s %6s name:\"%s\" supports_SC:%s", PRIVATE_ADDRESS(bd_addr),
        DeviceTypeText(device_type).c_str(), sec_bd_name,
        logbool(remote_supports_secure_connections).c_str());
  }

} tBTM_SEC_DEV_REC;