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

Commit a5c0e2fa authored by Chen Chen's avatar Chen Chen Committed by Cherrypicker Worker
Browse files

BluetoothMetrics: Upload local supported features

Bug: 255660153
Test: build
Change-Id: I15c69aa17e59a2baababd4b9d150ee1985d87da9
(cherry picked from commit 95a8b9a5)
Merged-In: I15c69aa17e59a2baababd4b9d150ee1985d87da9
parent d54410ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -268,7 +268,7 @@ struct Controller::impl {
    ASSERT_LOG(status == ErrorCode::SUCCESS, "Status 0x%02hhx, %s", status, ErrorCodeText(status).c_str());
    uint8_t page_number = complete_view.GetPageNumber();
    extended_lmp_features_array_.push_back(complete_view.GetExtendedLmpFeatures());

    bluetooth::os::LogMetricBluetoothLocalSupportedFeatures(page_number, complete_view.GetExtendedLmpFeatures());
    // Query all extended features
    if (page_number < complete_view.GetMaximumPageNumber()) {
      page_number++;
+12 −0
Original line number Diff line number Diff line
@@ -424,6 +424,18 @@ void LogMetricBluetoothHalCrashReason(
  }
}

void LogMetricBluetoothLocalSupportedFeatures(uint32_t page_num, uint64_t features) {
  int ret = stats_write(BLUETOOTH_LOCAL_SUPPORTED_FEATURES_REPORTED, page_num, features);
  if (ret < 0) {
    LOG_WARN(
        "Failed for LogMetricBluetoothLocalSupportedFeatures, "
        "page_num %d, features %s, error %d",
        page_num,
        std::to_string(features).c_str(),
        ret);
  }
}

void LogMetricBluetoothLocalVersions(
    uint32_t lmp_manufacturer_name,
    uint8_t lmp_version,
+2 −0
Original line number Diff line number Diff line
@@ -103,6 +103,8 @@ void LogMetricA2dpPlaybackEvent(const Address& address, int playback_state, int
void LogMetricBluetoothHalCrashReason(
    const Address& address, uint32_t error_code, uint32_t vendor_error_code) {}

void LogMetricBluetoothLocalSupportedFeatures(uint32_t page_num, uint64_t features) {}

void LogMetricBluetoothLocalVersions(
    uint32_t lmp_manufacturer_name,
    uint8_t lmp_version,
+2 −0
Original line number Diff line number Diff line
@@ -103,6 +103,8 @@ void LogMetricA2dpPlaybackEvent(const Address& address, int playback_state, int
void LogMetricBluetoothHalCrashReason(
    const Address& address, uint32_t error_code, uint32_t vendor_error_code) {}

void LogMetricBluetoothLocalSupportedFeatures(uint32_t page_num, uint64_t features) {}

void LogMetricBluetoothLocalVersions(
    uint32_t lmp_manufacturer_name,
    uint8_t lmp_version,
+2 −0
Original line number Diff line number Diff line
@@ -265,6 +265,8 @@ void LogMetricBluetoothHalCrashReason(
    uint32_t error_code,
    uint32_t vendor_error_code);

void LogMetricBluetoothLocalSupportedFeatures(uint32_t page_num, uint64_t features);

void LogMetricBluetoothLocalVersions(
    uint32_t lmp_manufacturer_name,
    uint8_t lmp_version,