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

Commit da8ef5cd authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

leaudio: Fix requirements on pacs characteristics

Only Context Available characteristic is required to have Notify properties.
Others are optional.

Bug: 298950713
Tag: #feature
Test: atest bluetooth_le_audio_client_test
Change-Id: I6ec923c8e784a4a40599c31f449ba9f3932db195
parent 4e3cc3ba
Loading
Loading
Loading
Loading
+7 −11
Original line number Diff line number Diff line
@@ -2539,13 +2539,11 @@ class LeAudioClientImpl : public LeAudioClient {
        hdl_pair.ccc_hdl = find_ccc_handle(charac);

        if (hdl_pair.ccc_hdl == 0) {
          disconnectInvalidDevice(leAudioDevice,
                                  ", snk pac char doesn't have ccc",
                                  LeAudioHealthDeviceStatType::INVALID_DB);
          return;
          LOG_INFO(", Sink PACs ccc not available");
        }

        if (!subscribe_for_notification(conn_id, leAudioDevice->address_,
        if (hdl_pair.ccc_hdl != 0 &&
            !subscribe_for_notification(conn_id, leAudioDevice->address_,
                                        hdl_pair)) {
          disconnectInvalidDevice(leAudioDevice,
                                  ", cound not subscribe for snk pac char",
@@ -2571,13 +2569,11 @@ class LeAudioClientImpl : public LeAudioClient {
        hdl_pair.ccc_hdl = find_ccc_handle(charac);

        if (hdl_pair.ccc_hdl == 0) {
          disconnectInvalidDevice(leAudioDevice,
                                  ", src pac char doesn't have ccc",
                                  LeAudioHealthDeviceStatType::INVALID_DB);
          return;
          LOG_INFO(", Source PACs ccc not available");
        }

        if (!subscribe_for_notification(conn_id, leAudioDevice->address_,
        if (hdl_pair.ccc_hdl != 0 &&
            !subscribe_for_notification(conn_id, leAudioDevice->address_,
                                        hdl_pair)) {
          disconnectInvalidDevice(leAudioDevice,
                                  ", could not subscribe for src pac char",
@@ -2685,7 +2681,7 @@ class LeAudioClientImpl : public LeAudioClient {
        leAudioDevice->audio_supp_cont_hdls_.ccc_hdl = find_ccc_handle(charac);

        if (leAudioDevice->audio_supp_cont_hdls_.ccc_hdl == 0) {
          LOG_INFO(", audio avails char doesn't have ccc");
          LOG_INFO(", audio supported char doesn't have ccc");
        }

        if (leAudioDevice->audio_supp_cont_hdls_.ccc_hdl != 0 &&