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

Commit b2594eca authored by Chris Manton's avatar Chris Manton
Browse files

log: Polish security record logging structures

Bug: 183374320
Test: gd/cert/run
Tag: #refactor

Change-Id: If22f738ca7aae645007b72512b25d8ad11a45620
parent 539e117a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ typedef enum : uint8_t {
} tBTM_SM4_BIT;

inline std::string class_of_device_text(const DEV_CLASS& cod) {
  return base::StringPrintf("0x%01x%01x%01x", cod[2], cod[1], cod[0]);
  return base::StringPrintf("0x%02x%02x%02x", cod[2], cod[1], cod[0]);
}

/*
@@ -424,10 +424,10 @@ struct tBTM_SEC_DEV_REC {

  std::string ToString() const {
    return base::StringPrintf(
        "%s %6s SecureConn:%s cod:%s remote_info:%s sm4:0x%02x name:\"%s\"",
        "%s %6s cod:%s remote_info:%-14s sm4:0x%02x SecureConn:%c name:\"%s\"",
        PRIVATE_ADDRESS(bd_addr), DeviceTypeText(device_type).c_str(),
        logbool(remote_supports_secure_connections).c_str(),
        class_of_device_text(dev_class).c_str(),
        remote_version_info.ToString().c_str(), sm4, sec_bd_name);
        remote_version_info.ToString().c_str(), sm4,
        (remote_supports_secure_connections) ? 'T' : 'F', sec_bd_name);
  }
};
+1 −1
Original line number Diff line number Diff line
@@ -548,7 +548,7 @@ inline std::string DeviceTypeText(tBT_DEVICE_TYPE type) {
    case BT_DEVICE_TYPE_BLE:
      return std::string("BLE");
    case BT_DEVICE_TYPE_DUMO:
      return std::string("BR_EDR and BLE");
      return std::string("DUAL");
    default:
      return std::string("Unknown");
  }