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

Commit 39a6fc84 authored by Steven Liu's avatar Steven Liu
Browse files

Enable RAS only for channel sounding.

Bug: 324185011
Bug: 361816733
Test: m com.android.btservices
Change-Id: I0a9efe7e4dc7c1788643e5e7b2caf928b4660670
parent 3f1572a9
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -60,11 +60,15 @@ public:
  }

  void StartDistanceMeasurement(RawAddress identity_addr, uint16_t interval, uint8_t method) {
    DistanceMeasurementMethod distance_measurement_method =
            static_cast<DistanceMeasurementMethod>(method);
    bluetooth::shim::GetDistanceMeasurementManager()->StartDistanceMeasurement(
            bluetooth::ToGdAddress(identity_addr), GetConnectionHandle(identity_addr), interval,
            static_cast<DistanceMeasurementMethod>(method));
            distance_measurement_method);
    if (distance_measurement_method == DistanceMeasurementMethod::METHOD_CS) {
      bluetooth::ras::GetRasClient()->Connect(identity_addr);
    }
  }

  void StopDistanceMeasurement(RawAddress identity_addr, uint8_t method) {
    bluetooth::shim::GetDistanceMeasurementManager()->StopDistanceMeasurement(