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

Commit e43eaae9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "StopWatch: Declare a stop_watch variable while timing"

parents 22a79835 ff6008e7
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ class BluetoothAudioPortImpl : public IBluetoothAudioPort {
      : transport_instance_(transport_instance), provider_(provider) {}

  Return<void> startStream() override {
    StopWatchLegacy(__func__);
    StopWatchLegacy stop_watch(__func__);
    BluetoothAudioCtrlAck ack = transport_instance_->StartRequest();
    if (ack != BluetoothAudioCtrlAck::PENDING) {
      auto hidl_retval =
@@ -88,7 +88,7 @@ class BluetoothAudioPortImpl : public IBluetoothAudioPort {
  }

  Return<void> suspendStream() override {
    StopWatchLegacy(__func__);
    StopWatchLegacy stop_watch(__func__);
    BluetoothAudioCtrlAck ack = transport_instance_->SuspendRequest();
    if (ack != BluetoothAudioCtrlAck::PENDING) {
      auto hidl_retval =
@@ -102,14 +102,14 @@ class BluetoothAudioPortImpl : public IBluetoothAudioPort {
  }

  Return<void> stopStream() override {
    StopWatchLegacy(__func__);
    StopWatchLegacy stop_watch(__func__);
    transport_instance_->StopRequest();
    return Void();
  }

  Return<void> getPresentationPosition(
      getPresentationPosition_cb _hidl_cb) override {
    StopWatchLegacy(__func__);
    StopWatchLegacy stop_watch(__func__);
    uint64_t remote_delay_report_ns;
    uint64_t total_bytes_read;
    timespec data_position;
@@ -136,7 +136,7 @@ class BluetoothAudioPortImpl : public IBluetoothAudioPort {
  }

  Return<void> updateMetadata(const SourceMetadata& sourceMetadata) override {
    StopWatchLegacy(__func__);
    StopWatchLegacy stop_watch(__func__);
    LOG(INFO) << __func__ << ": " << sourceMetadata.tracks.size()
              << " track(s)";
    // refer to StreamOut.impl.h within Audio HAL (AUDIO_HAL_VERSION_5_0)
+5 −5
Original line number Diff line number Diff line
@@ -83,14 +83,14 @@ class InternalHciCallbacks : public IBluetoothHciCallbacks {
  }

  Return<void> initializationComplete(HidlStatus status) {
    common::StopWatch(__func__);
    common::StopWatch stop_watch(__func__);
    ASSERT(status == HidlStatus::SUCCESS);
    init_promise_->set_value();
    return Void();
  }

  Return<void> hciEventReceived(const hidl_vec<uint8_t>& event) override {
    common::StopWatch(GetTimerText(__func__, event));
    common::StopWatch stop_watch(GetTimerText(__func__, event));
    std::vector<uint8_t> received_hci_packet(event.begin(), event.end());
    btsnoop_logger_->Capture(received_hci_packet, SnoopLogger::Direction::INCOMING, SnoopLogger::PacketType::EVT);
    if (common::init_flags::btaa_hci_is_enabled()) {
@@ -103,7 +103,7 @@ class InternalHciCallbacks : public IBluetoothHciCallbacks {
  }

  Return<void> aclDataReceived(const hidl_vec<uint8_t>& data) override {
    common::StopWatch(GetTimerText(__func__, data));
    common::StopWatch stop_watch(GetTimerText(__func__, data));
    std::vector<uint8_t> received_hci_packet(data.begin(), data.end());
    btsnoop_logger_->Capture(received_hci_packet, SnoopLogger::Direction::INCOMING, SnoopLogger::PacketType::ACL);
    if (common::init_flags::btaa_hci_is_enabled()) {
@@ -116,7 +116,7 @@ class InternalHciCallbacks : public IBluetoothHciCallbacks {
  }

  Return<void> scoDataReceived(const hidl_vec<uint8_t>& data) override {
    common::StopWatch(GetTimerText(__func__, data));
    common::StopWatch stop_watch(GetTimerText(__func__, data));
    std::vector<uint8_t> received_hci_packet(data.begin(), data.end());
    btsnoop_logger_->Capture(received_hci_packet, SnoopLogger::Direction::INCOMING, SnoopLogger::PacketType::SCO);
    if (common::init_flags::btaa_hci_is_enabled()) {
@@ -129,7 +129,7 @@ class InternalHciCallbacks : public IBluetoothHciCallbacks {
  }

  Return<void> isoDataReceived(const hidl_vec<uint8_t>& data) override {
    common::StopWatch(GetTimerText(__func__, data));
    common::StopWatch stop_watch(GetTimerText(__func__, data));
    std::vector<uint8_t> received_hci_packet(data.begin(), data.end());
    btsnoop_logger_->Capture(received_hci_packet, SnoopLogger::Direction::INCOMING, SnoopLogger::PacketType::ISO);
    if (callback_ != nullptr) {