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

Commit 6c607c70 authored by Myles Watson's avatar Myles Watson
Browse files

RootCanal shouldn't depend on common

Bug: 180413087
Test: cert/run
      atest bluetooth_test_gd
Tag: #gd-refactor
Change-Id: I743af9de1b816a485d4fb8e4c242d7beebd2eb49
parent fb838d54
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -7,16 +7,6 @@ package {
    default_applicable_licenses: ["system_bt_license"],
}

filegroup {
    name: "BluetoothCommonSourcesForRootCanal",
    srcs: [
        "init_flags.cc",
        "metric_id_manager.cc",
        "strings.cc",
        "stop_watch.cc",
    ],
}

filegroup {
    name: "BluetoothCommonSources",
    srcs: [
+4 −6
Original line number Diff line number Diff line
@@ -115,14 +115,12 @@ std::optional<ClassOfDevice> ClassOfDevice::FromUint32Legacy(uint32_t cod_int) {
}

std::optional<ClassOfDevice> ClassOfDevice::FromLegacyConfigString(const std::string& str) {
  auto num_64bit = common::Uint64FromString(str);
  if (!num_64bit) {
  char* ptr = nullptr;
  auto num = std::strtoull(str.data(), &ptr, 10);
  if (num > 0xffffff) {
    return std::nullopt;
  }
  if (!common::IsNumberInNumericLimits<uint32_t>(*num_64bit)) {
    return std::nullopt;
  }
  return FromUint32Legacy(static_cast<uint32_t>(*num_64bit));
  return FromUint32Legacy(static_cast<uint32_t>(num));
}

uint32_t ClassOfDevice::ToUint32Legacy() const {
+0 −1
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ cc_library_static {
        "model/setup/test_model.cc",
        ":BluetoothPacketSources",
        ":BluetoothHciClassSources",
        ":BluetoothCommonSourcesForRootCanal",
    ],
    cflags: [
        "-fvisibility=hidden",