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

Commit 27ad13c0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Respect AVRCP versions in SDP records"

parents 9d9e1fca 8e13fe1d
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -209,6 +209,16 @@ uint16_t AVRC_AddRecord(uint16_t service_uuid, const char* p_service_name,
  }
  result &= SDP_AddServiceClassIdList(sdp_handle, count, class_list);

  uint16_t protocol_reported_version;
  /* AVRCP versions 1.3 to 1.5 report (version - 1) in the protocol
     descriptor list. Oh, and 1.6 and 1.6.1 report version 1.4.
     /because-we-smart */
  if (profile_version < AVRC_REV_1_6) {
    protocol_reported_version = profile_version - 1;
  } else {
    protocol_reported_version = AVCT_REV_1_4;
  }

  /* add protocol descriptor list */
  tSDP_PROTOCOL_ELEM avrc_proto_desc_list[AVRC_NUM_PROTO_ELEMS];
  avrc_proto_desc_list[0].num_params = 1;
@@ -218,7 +228,7 @@ uint16_t AVRC_AddRecord(uint16_t service_uuid, const char* p_service_name,
  for (index = 1; index < AVRC_NUM_PROTO_ELEMS; index++) {
    avrc_proto_desc_list[index].num_params = 1;
    avrc_proto_desc_list[index].protocol_uuid = UUID_PROTOCOL_AVCTP;
    avrc_proto_desc_list[index].params[0] = AVCT_REV_1_4;
    avrc_proto_desc_list[index].params[0] = protocol_reported_version;
    avrc_proto_desc_list[index].params[1] = 0;
  }
  result &= SDP_AddProtocolList(sdp_handle, AVRC_NUM_PROTO_ELEMS,
@@ -234,7 +244,7 @@ uint16_t AVRC_AddRecord(uint16_t service_uuid, const char* p_service_name,
    avrc_add_proto_desc_list.list_elem[0].params[1] = 0;
    avrc_add_proto_desc_list.list_elem[1].num_params = 1;
    avrc_add_proto_desc_list.list_elem[1].protocol_uuid = UUID_PROTOCOL_AVCTP;
    avrc_add_proto_desc_list.list_elem[1].params[0] = AVCT_REV_1_4;
    avrc_add_proto_desc_list.list_elem[1].params[0] = protocol_reported_version;
    avrc_add_proto_desc_list.list_elem[1].params[1] = 0;

    result &=