From 417d1b696e6bcf1e22478b93e79aa5936537483a Mon Sep 17 00:00:00 2001 From: Ajay Panicker Date: Thu, 13 Oct 2016 16:07:44 -0700 Subject: [PATCH] Define cover art attribute id Test: Tested manually Bug: 32081388 Change-Id: Ib9df511a36d19f1bd5197836ad34b19edba73748 --- src/com/android/bluetooth/avrcp/AddressedMediaPlayer.java | 4 ++++ src/com/android/bluetooth/avrcp/AvrcpConstants.java | 1 + src/com/android/bluetooth/avrcp/BrowsedMediaPlayer.java | 3 +++ 3 files changed, 8 insertions(+) diff --git a/src/com/android/bluetooth/avrcp/AddressedMediaPlayer.java b/src/com/android/bluetooth/avrcp/AddressedMediaPlayer.java index d66c4963..9af309d0 100644 --- a/src/com/android/bluetooth/avrcp/AddressedMediaPlayer.java +++ b/src/com/android/bluetooth/avrcp/AddressedMediaPlayer.java @@ -469,6 +469,10 @@ public class AddressedMediaPlayer { .getString(MediaMetadata.METADATA_KEY_DURATION); break; + case AvrcpConstants.ATTRID_COVER_ART: + Log.e(TAG, "Cover art attribute not supported"); + break; + default: Log.e(TAG, "Unknown attribute ID"); } diff --git a/src/com/android/bluetooth/avrcp/AvrcpConstants.java b/src/com/android/bluetooth/avrcp/AvrcpConstants.java index e0a5ff43..51a70d45 100644 --- a/src/com/android/bluetooth/avrcp/AvrcpConstants.java +++ b/src/com/android/bluetooth/avrcp/AvrcpConstants.java @@ -90,6 +90,7 @@ final class AvrcpConstants { static final int ATTRID_NUM_TRACKS = 0x05; static final int ATTRID_GENRE = 0x06; static final int ATTRID_PLAY_TIME = 0x07; + static final int ATTRID_COVER_ART = 0x08; /* constants to send in Track change response */ static final byte NO_TRACK_SELECTED = (byte)0xFF; diff --git a/src/com/android/bluetooth/avrcp/BrowsedMediaPlayer.java b/src/com/android/bluetooth/avrcp/BrowsedMediaPlayer.java index 8c454684..9c0ae07a 100644 --- a/src/com/android/bluetooth/avrcp/BrowsedMediaPlayer.java +++ b/src/com/android/bluetooth/avrcp/BrowsedMediaPlayer.java @@ -628,6 +628,9 @@ class BrowsedMediaPlayer { case AvrcpConstants.ATTRID_PLAY_TIME: attrValue = resultItems.get(itemIndex).getDescription().getExtras() .getString(MediaMetadata.METADATA_KEY_DURATION); + + case AvrcpConstants.ATTRID_COVER_ART: + Log.e(TAG, "Cover art attribute not supported"); break; default: -- 2.11.0