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

Commit 8db86064 authored by Chris Manton's avatar Chris Manton
Browse files

legacy: Remove stack/metrics/stack_metrics_logging.cc::is_any_gd_enabled

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

Change-Id: Ifab31616bbdbb438db7098037aa4a2a4ecd1e938
parent 2d2f6ab0
Loading
Loading
Loading
Loading
+14 −42
Original line number Diff line number Diff line
@@ -27,15 +27,9 @@ void log_classic_pairing_event(const RawAddress& address, uint16_t handle,
                               uint32_t hci_cmd, uint16_t hci_event,
                               uint16_t cmd_status, uint16_t reason_code,
                               int64_t event_value) {
  if (bluetooth::shim::is_any_gd_enabled()) {
  bluetooth::shim::LogMetricClassicPairingEvent(address, handle, hci_cmd,
                                                hci_event, cmd_status,
                                                reason_code, event_value);
  } else {
    bluetooth::common::LogClassicPairingEvent(address, handle, hci_cmd,
                                              hci_event, cmd_status,
                                              reason_code, event_value);
  }
}

void log_link_layer_connection_event(
@@ -43,39 +37,23 @@ void log_link_layer_connection_event(
    android::bluetooth::DirectionEnum direction, uint16_t link_type,
    uint32_t hci_cmd, uint16_t hci_event, uint16_t hci_ble_event,
    uint16_t cmd_status, uint16_t reason_code) {
  if (bluetooth::shim::is_any_gd_enabled()) {
  bluetooth::shim::LogMetricLinkLayerConnectionEvent(
      address, connection_handle, direction, link_type, hci_cmd, hci_event,
      hci_ble_event, cmd_status, reason_code);
  } else {
    bluetooth::common::LogLinkLayerConnectionEvent(
        address, connection_handle, direction, link_type, hci_cmd, hci_event,
        hci_ble_event, cmd_status, reason_code);
  }
}

void log_smp_pairing_event(const RawAddress& address, uint8_t smp_cmd,
                           android::bluetooth::DirectionEnum direction,
                           uint8_t smp_fail_reason) {
  if (bluetooth::shim::is_any_gd_enabled()) {
  bluetooth::shim::LogMetricSmpPairingEvent(address, smp_cmd, direction,
                                            smp_fail_reason);
  } else {
    bluetooth::common::LogSmpPairingEvent(address, smp_cmd, direction,
                                          smp_fail_reason);
  }
}

void log_sdp_attribute(const RawAddress& address, uint16_t protocol_uuid,
                       uint16_t attribute_id, size_t attribute_size,
                       const char* attribute_value) {
  if (bluetooth::shim::is_any_gd_enabled()) {
  bluetooth::shim::LogMetricSdpAttribute(address, protocol_uuid, attribute_id,
                                         attribute_size, attribute_value);
  } else {
    bluetooth::common::LogSdpAttribute(address, protocol_uuid, attribute_id,
                                       attribute_size, attribute_value);
  }
}

void log_manufacturer_info(const RawAddress& address,
@@ -85,13 +63,7 @@ void log_manufacturer_info(const RawAddress& address,
                           const std::string& model,
                           const std::string& hardware_version,
                           const std::string& software_version) {
  if (bluetooth::shim::is_any_gd_enabled()) {
  bluetooth::shim::LogMetricManufacturerInfo(
        address, source_type, source_name, manufacturer, model,
        hardware_version, software_version);
  } else {
    bluetooth::common::LogManufacturerInfo(address, source_type, source_name,
                                           manufacturer, model,
                                           hardware_version, software_version);
  }
      address, source_type, source_name, manufacturer, model, hardware_version,
      software_version);
}