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

Commit 031d5107 authored by Marie Janssen's avatar Marie Janssen Committed by android-build-merger
Browse files

Merge "AVRCP: workaround invalid setBrowsedPlayer id" am: d69d0128 am: 7964718e

am: ed47f59d

Change-Id: I173abf0e057b550960c3eb19ced30c1a98e70741
parents 2f1fec02 ed47f59d
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1552,8 +1552,15 @@ public final class Avrcp {
        // checking for error cases
        if (mMediaPlayerInfoList.isEmpty()) {
            status = AvrcpConstants.RSP_NO_AVBL_PLAY;
            Log.w(TAG, " No Available Players to set, sending response back ");
            Log.w(TAG, "setBrowsedPlayer: No available players! ");
        } else {
            // Workaround for broken controllers selecting ID 0
            // Seen at least on Ford, Chevrolet MyLink
            if (selectedId == 0) {
                Log.w(TAG, "setBrowsedPlayer: workaround invalid id 0");
                selectedId = mCurrAddrPlayerID;
            }

            // update current browse player id and start browsing service
            updateNewIds(mCurrAddrPlayerID, selectedId);
            String browsedPackage = getPackageName(selectedId);