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

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

Merge "Fix the potential native crash" into main

parents 1c233a71 e237e3a6
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -139,8 +139,6 @@ struct DistanceMeasurementManager::impl : bluetooth::hal::RangingHalCallback {
              vendor_specific_reply.size());
    if (cs_trackers_.find(connection_handle) == cs_trackers_.end()) {
      log::error("Can't find CS tracker for connection_handle {}", connection_handle);
      distance_measurement_callbacks_->OnDistanceMeasurementStartFail(
              cs_trackers_[connection_handle].address, REASON_INTERNAL_ERROR, METHOD_CS);
      return;
    }

@@ -157,6 +155,10 @@ struct DistanceMeasurementManager::impl : bluetooth::hal::RangingHalCallback {

  void OnOpenFailed(uint16_t connection_handle) {
    log::info("connection_handle:0x{:04x}", connection_handle);
    if (cs_trackers_.find(connection_handle) == cs_trackers_.end()) {
      log::error("Can't find CS tracker for connection_handle {}", connection_handle);
      return;
    }
    distance_measurement_callbacks_->OnDistanceMeasurementStartFail(
            cs_trackers_[connection_handle].address, REASON_INTERNAL_ERROR, METHOD_CS);
  }
@@ -165,8 +167,6 @@ struct DistanceMeasurementManager::impl : bluetooth::hal::RangingHalCallback {
    log::info("connection_handle:0x{:04x}, success:{}", connection_handle, success);
    if (cs_trackers_.find(connection_handle) == cs_trackers_.end()) {
      log::error("Can't find CS tracker for connection_handle {}", connection_handle);
      distance_measurement_callbacks_->OnDistanceMeasurementStartFail(
              cs_trackers_[connection_handle].address, REASON_INTERNAL_ERROR, METHOD_CS);
      return;
    }
    distance_measurement_callbacks_->OnHandleVendorSpecificReplyComplete(