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

Commit 0e70af26 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4818534 from 805665d3 to pi-release

Change-Id: I627c66867f45ad37d63b9ed822533cb2f69d29cf
parents 22e7aa38 805665d3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -126,8 +126,8 @@ void Device::VendorPacketHandler(uint8_t label,
      // this currently since the current implementation only has one
      // player and the player will never change, but we need it for a
      // more complete implementation.
      auto response =
          SetAddressedPlayerResponseBuilder::MakeBuilder(Status::NO_ERROR);
      auto response = RejectBuilder::MakeBuilder(
          CommandPdu::SET_ADDRESSED_PLAYER, Status::INVALID_PLAYER_ID);
      send_message(label, false, std::move(response));
    } break;

@@ -605,8 +605,8 @@ void Device::HandlePlayItem(uint8_t label,

  if (media_id == "") {
    DEVICE_VLOG(2) << "Could not find item";
    auto response =
        PlayItemResponseBuilder::MakeBuilder(Status::DOES_NOT_EXIST);
    auto response = RejectBuilder::MakeBuilder(CommandPdu::PLAY_ITEM,
                                               Status::DOES_NOT_EXIST);
    send_message(label, false, std::move(response));
    return;
  }
+2 −2
Original line number Diff line number Diff line
@@ -713,8 +713,8 @@ TEST_F(AvrcpDeviceTest, setAddressedPlayerTest) {

  test_device->RegisterInterfaces(&interface, &a2dp_interface, nullptr);

  auto set_addr_player_rsp =
      SetAddressedPlayerResponseBuilder::MakeBuilder(Status::NO_ERROR);
  auto set_addr_player_rsp = RejectBuilder::MakeBuilder(
      CommandPdu::SET_ADDRESSED_PLAYER, Status::INVALID_PLAYER_ID);

  EXPECT_CALL(response_cb,
              Call(1, false, matchPacket(std::move(set_addr_player_rsp))))
+3 −0
Original line number Diff line number Diff line
@@ -333,9 +333,11 @@ static void process_service_attr_req(tCONN_CB* p_ccb, uint16_t trans_num,

  /* Extract the record handle */
  BE_STREAM_TO_UINT32(rec_handle, p_req);
  param_len -= sizeof(rec_handle);

  /* Get the max list length we can send. Cap it at MTU size minus overhead */
  BE_STREAM_TO_UINT16(max_list_len, p_req);
  param_len -= sizeof(max_list_len);

  if (max_list_len > (p_ccb->rem_mtu_size - SDP_MAX_ATTR_RSPHDR_LEN))
    max_list_len = p_ccb->rem_mtu_size - SDP_MAX_ATTR_RSPHDR_LEN;
@@ -567,6 +569,7 @@ static void process_service_search_attr_req(tCONN_CB* p_ccb, uint16_t trans_num,
  if (max_list_len > (p_ccb->rem_mtu_size - SDP_MAX_SERVATTR_RSPHDR_LEN))
    max_list_len = p_ccb->rem_mtu_size - SDP_MAX_SERVATTR_RSPHDR_LEN;

  param_len = static_cast<uint16_t>(p_req_end - p_req);
  p_req = sdpu_extract_attr_seq(p_req, param_len, &attr_seq);

  if ((!p_req) || (!attr_seq.num_attr) ||
+7 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include "bt_target.h"

#include <string.h>
#include "log/log.h"
#include "smp_int.h"

const char* const smp_br_state_name[SMP_BR_STATE_MAX + 1] = {
@@ -310,6 +311,12 @@ void smp_br_state_machine_event(tSMP_CB* p_cb, tSMP_BR_EVENT event,
    return;
  }

  if (p_cb->role > HCI_ROLE_SLAVE) {
    SMP_TRACE_ERROR("%s: invalid role %d", __func__, p_cb->role);
    android_errorWriteLog(0x534e4554, "80145946");
    return;
  }

  SMP_TRACE_DEBUG("SMP Role: %s State: [%s (%d)], Event: [%s (%d)]",
                  (p_cb->role == HCI_ROLE_SLAVE) ? "Slave" : "Master",
                  smp_get_br_state_name(p_cb->br_state), p_cb->br_state,