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

Commit 5b7fad0e authored by Chienyuan Huang's avatar Chienyuan Huang
Browse files

CS: Do not omit any CS subevents when sending CS enable

Flag: com.android.bluetooth.flags.channel_sounding_in_stack
Bug: 324185011
Bug: 382130397
Test: m com.android.btservice
Change-Id: Icf4ff5fe23b20485a6cb5e267f28f2932278738e
parent 1b4b1a12
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1234,6 +1234,8 @@ struct DistanceMeasurementManager::impl : bluetooth::hal::RangingHalCallback {
    CsTracker* live_tracker = nullptr;
    CsProcedureData* procedure_data = nullptr;
    uint8_t valid_requester_states = static_cast<uint8_t>(CsTrackerState::STARTED);
    // TODO(b/384928509): Prevent sending CS enable if procedures are not yet complete.
    valid_requester_states |= static_cast<uint8_t>(CsTrackerState::WAIT_FOR_PROCEDURE_ENABLED);
    uint8_t valid_responder_states = static_cast<uint8_t>(CsTrackerState::STARTED);
    if (event.GetSubeventCode() == SubeventCode::LE_CS_SUBEVENT_RESULT) {
      auto cs_event_result = LeCsSubeventResultView::Create(event);