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

Commit ced18d05 authored by Myles Watson's avatar Myles Watson Committed by Gerrit Code Review
Browse files

Merge "[CS] Enable security after read remote supported capabilities complete" into main

parents 230e3102 a0e49128
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -194,8 +194,6 @@ struct DistanceMeasurementManager::impl {

    if (!cs_trackers_[connection_handle].setup_complete) {
      send_le_cs_read_remote_supported_capabilities(connection_handle);
      send_le_cs_set_default_settings(connection_handle);
      send_le_cs_security_enable(connection_handle);
      return;
    }
    if (!cs_trackers_[connection_handle].config_set) {
@@ -406,11 +404,13 @@ struct DistanceMeasurementManager::impl {
      return;
    }
    uint16_t connection_handle = event_view.GetConnectionHandle();
    send_le_cs_set_default_settings(event_view.GetConnectionHandle());
    if (cs_trackers_.find(connection_handle) == cs_trackers_.end()) {
      // Create a cs tracker with role reflector
      // TODO: Check ROLE via CS config. (b/304295768)
      cs_trackers_[connection_handle].role = CsRole::REFLECTOR;
      send_le_cs_set_default_settings(event_view.GetConnectionHandle());
    } else {
      send_le_cs_security_enable(connection_handle);
    }

    if (event_view.GetOptionalSubfeaturesSupported().phase_based_ranging_ == 0x01) {