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

Commit ee8ba6b1 authored by Joseph Pirozzo's avatar Joseph Pirozzo
Browse files

AVRCP Controller get play status

Correct the parsing error in the GET_PLAY_STATUS message and call the
proper jni callback when it is received.

Bug: 139033614
Test: Connect AVRCP change media players, observe correct value parsed.
Change-Id: I8302b64efdd72bfa671cca5b8c512a436fa54ab3
(cherry picked from commit 68001698)

Merged-In: 68001698
Change-Id: I0c753fbc7bb62698cf23b9ded13497b6b60cda35
Merged-In: I8302b64efdd72bfa671cca5b8c512a436fa54ab3
parent 4bc2a232
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3810,6 +3810,10 @@ static void handle_get_playstatus_response(tBTA_AV_META_MSG* pmeta_msg,


  if (p_rsp->status == AVRC_STS_NO_ERROR) {
    do_in_jni_thread(
        FROM_HERE,
        base::Bind(bt_rc_ctrl_callbacks->play_status_changed_cb, p_dev->rc_addr,
                   (btrc_play_status_t)p_rsp->play_status));
    do_in_jni_thread(
        FROM_HERE,
        base::Bind(bt_rc_ctrl_callbacks->play_position_changed_cb,
+1 −1
Original line number Diff line number Diff line
@@ -806,7 +806,7 @@ static tAVRC_STS avrc_ctrl_pars_vendor_rsp(tAVRC_MSG_VENDOR* p_msg,
      if (len < min_len) goto length_error;
      BE_STREAM_TO_UINT32(p_result->get_play_status.song_len, p);
      BE_STREAM_TO_UINT32(p_result->get_play_status.song_pos, p);
      BE_STREAM_TO_UINT8(p_result->get_play_status.status, p);
      BE_STREAM_TO_UINT8(p_result->get_play_status.play_status, p);
      break;

    case AVRC_PDU_SET_ADDRESSED_PLAYER: