OSDN Git Service

AVRCP Controller refresh track data on Interim
authorJoseph Pirozzo <pirozzoj@google.com>
Thu, 14 Nov 2019 00:02:06 +0000 (16:02 -0800)
committerJoseph Pirozzo <pirozzoj@google.com>
Fri, 13 Mar 2020 17:39:36 +0000 (17:39 +0000)
Upon receiving an interim track changed event fetch the now playing
track information.  Resolves issues where track changes get out of sync.

Bug: 143954201
Test: connect a phone and change tracks rapidly on phone.
Change-Id: I1e4ce62df6839dd2b9cf40832556a9b2608593e7
(cherry picked from commit a3d62166f685f5249b813bd110e894682c84da54)

Change-Id: Ia6cc2a7a0430d6d9e3ae6e911e3fc8834221b599
Merged-In: I1e4ce62df6839dd2b9cf40832556a9b2608593e7

btif/src/btif_rc.cc

index 5502406..571967e 100644 (file)
@@ -3153,11 +3153,10 @@ static void handle_notification_response(tBTA_AV_META_MSG* pmeta_msg,
           break;
         } else {
           uint8_t* p_data = p_rsp->param.track;
-          /* Update the UID for current track
-           * Attributes will be fetched after the AVRCP procedure
-           */
           BE_STREAM_TO_UINT64(p_dev->rc_playing_uid, p_data);
           get_play_status_cmd(p_dev);
+          get_element_attribute_cmd(AVRC_MAX_NUM_MEDIA_ATTR_ID, attr_list,
+                                    p_dev);
         }
         break;