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

Commit 2753907a authored by Sal Savage's avatar Sal Savage Committed by Gerrit Code Review
Browse files

Merge changes from topic "avrcp-target-cover-art"

* changes:
  Add tests for the AVRCP Target Cover Art feature
  Pass BIP client status down and use it to decide to send image handles
  Add a path to add the PSM of the BIP OBEX server to the SDP record
  Allow NewAvrcp to manage its own SDP record
parents 5b0c0580 f6a88335
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ void bta_ar_reg_avrc(uint16_t service_uuid, const char* service_name,
      bta_ar_cb.sdp_tg_handle = SDP_CreateRecord();
      AVRC_AddRecord(service_uuid, service_name, provider_name, categories,
                     bta_ar_cb.sdp_tg_handle, browse_supported,
                     profile_version);
                     profile_version, 0);
      bta_sys_add_uuid(service_uuid);
    }
    /* only one TG is allowed (first-come, first-served).
@@ -180,7 +180,7 @@ void bta_ar_reg_avrc(uint16_t service_uuid, const char* service_name,
      bta_ar_cb.sdp_ct_handle = SDP_CreateRecord();
      AVRC_AddRecord(service_uuid, service_name, provider_name, categories,
                     bta_ar_cb.sdp_ct_handle, browse_supported,
                     profile_version);
                     profile_version, 0);
      bta_sys_add_uuid(service_uuid);
    } else {
      /* multiple CTs are allowed.
+11 −1
Original line number Diff line number Diff line
@@ -2262,7 +2262,17 @@ void bta_av_dereg_comp(tBTA_AV_DATA* p_data) {

    /* remove the A2DP SDP record, if no more audio stream is left */
    if (!p_cb->reg_audio) {

      /* Only remove the SDP record if we're the ones that created it */
      if (is_new_avrcp_enabled()) {
        APPL_TRACE_DEBUG("%s: newavrcp is the owner of the AVRCP Target SDP "
            "record. Don't dereg the SDP record", __func__);
      } else {
        APPL_TRACE_DEBUG("%s: newavrcp is not enabled. Remove SDP record",
            __func__);
        bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REMOTE_CONTROL);
      }

      if (p_cb->sdp_a2dp_handle) {
        bta_av_del_sdp_rec(&p_cb->sdp_a2dp_handle);
        p_cb->sdp_a2dp_handle = 0;
+25 −17
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include "osi/include/osi.h"
#include "osi/include/properties.h"

#include "avrcp_service.h"
#include "bta_av_co.h"
#include "bta_av_int.h"
#include "btif/include/btif_av_co.h"
@@ -478,8 +479,14 @@ static void bta_av_api_register(tBTA_AV_DATA* p_data) {
        /* For the Audio Sink role we support additional TG to support
         * absolute volume.
         */
        uint16_t profile_version = AVRC_REV_1_0;
        if (is_new_avrcp_enabled()) {
          APPL_TRACE_DEBUG("%s: newavrcp is the owner of the AVRCP Target SDP "
              "record. Don't create the SDP record", __func__);
        } else {
          APPL_TRACE_DEBUG("%s: newavrcp is not enabled. Create SDP record",
              __func__);

          uint16_t profile_version = AVRC_REV_1_0;
          if (!strncmp(AVRCP_1_6_STRING, avrcp_version,
                      sizeof(AVRCP_1_6_STRING))) {
            profile_version = AVRC_REV_1_6;
@@ -498,6 +505,7 @@ static void bta_av_api_register(tBTA_AV_DATA* p_data) {
              p_bta_av_cfg->avrc_tg_cat,
              (bta_av_cb.features & BTA_AV_FEAT_BROWSE), profile_version);
        }
      }

      /* Set the Capturing service class bit */
      if (profile_initialized == UUID_SERVCLASS_AUDIO_SOURCE)
+34 −0
Original line number Diff line number Diff line
@@ -299,6 +299,40 @@ void BTA_GetEirService(uint8_t* p_eir, size_t eir_len,
  }
}

/*******************************************************************************
 *
 * Function         BTA_AddEirUuid
 *
 * Description      Request to add a service class UID to the local
 *                  device's EIR data.
 *
 * Parameters       uuid16 - The service class UUID you wish to add
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_AddEirUuid(uint16_t uuid16) {
  APPL_TRACE_API("%s: %d", __func__, uuid16);
  bta_sys_add_uuid(uuid16);
}

/*******************************************************************************
 *
 * Function         BTA_RemoveEirUuid
 *
 * Description      Request to remove a service class UID from the local
 *                  device's EIR data.
 *
 * Parameters       uuid16 - The service class UUID you wish to remove
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_RemoveEirUuid(uint16_t uuid16) {
  APPL_TRACE_API("%s: %d", __func__, uuid16);
  bta_sys_remove_uuid(uuid16);
}

/*******************************************************************************
 *
 * Function         BTA_DmGetConnectionState
+28 −0
Original line number Diff line number Diff line
@@ -839,6 +839,34 @@ extern tBTA_STATUS BTA_DmRemoveDevice(const RawAddress& bd_addr);
extern void BTA_GetEirService(uint8_t* p_eir, size_t eir_len,
                              tBTA_SERVICE_MASK* p_services);

/*******************************************************************************
 *
 * Function         BTA_AddEirUuid
 *
 * Description      Request to add a new service class UUID to the local
 *                  device's EIR data.
 *
 * Parameters       uuid16 - The service class UUID you wish to add
 *
 * Returns          void
 *
 ******************************************************************************/
extern void BTA_AddEirUuid(uint16_t uuid16);

/*******************************************************************************
 *
 * Function         BTA_RemoveEirUuid
 *
 * Description      Request to remove a service class UID from the local
 *                  device's EIR data.
 *
 * Parameters       uuid16 - The service class UUID you wish to remove
 *
 * Returns          void
 *
 ******************************************************************************/
extern void BTA_RemoveEirUuid(uint16_t uuid16);

/*******************************************************************************
 *
 * Function         BTA_DmGetConnectionState
Loading