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

Commit 08f109bd authored by koh.changseok's avatar koh.changseok Committed by Marie Janssen
Browse files

AVRCP: UID_CHANGED response for GetItemAttributes

When we receive a GetItemAttributes command with the wrong UID counter
attribute, we should respond with UID_CHANGED.  Currently our UID
counter never changes from 0, but it may in the future.

Bug: 62924455
Test: PTS test AVRCP/TG/MCN/CB/BI-05-C
Change-Id: I98b6dd879019b04c695c8dc28afab88ae0e05175
parent d69d0128
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2222,6 +2222,12 @@ public final class Avrcp {
    }

    private void handleGetItemAttr(AvrcpCmd.ItemAttrCmd itemAttr) {
        if (itemAttr.mUidCounter != sUIDCounter) {
            Log.e(TAG, "handleGetItemAttr: invaild uid counter.");
            getItemAttrRspNative(
                    itemAttr.mAddress, AvrcpConstants.RSP_UID_CHANGED, (byte) 0, null, null);
            return;
        }
        if (itemAttr.mScope == AvrcpConstants.BTRC_SCOPE_NOW_PLAYING) {
            if (mCurrAddrPlayerID == NO_PLAYER_ID) {
                getItemAttrRspNative(