From a8fbb97cfe4a0074f96016023ef93235144b7a3b Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Wed, 25 Nov 2020 16:52:20 -0800 Subject: [PATCH] add an icon to the Android Auto queue --- .../antennapod/core/service/playback/PlaybackService.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java index 92fd9cb55..30a595cee 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java @@ -7,6 +7,7 @@ import android.app.UiModeManager; import android.bluetooth.BluetoothA2dp; import android.content.BroadcastReceiver; import android.content.ComponentName; +import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; @@ -370,7 +371,14 @@ public class PlaybackService extends MediaBrowserServiceCompat { } private MediaBrowserCompat.MediaItem createBrowsableMediaItemForRoot() { + Uri uri = new Uri.Builder() + .scheme(ContentResolver.SCHEME_ANDROID_RESOURCE) + .authority(getResources().getResourcePackageName(R.drawable.ic_playlist_black)) + .appendPath(getResources().getResourceTypeName(R.drawable.ic_playlist_black)) + .appendPath(getResources().getResourceEntryName(R.drawable.ic_playlist_black)) + .build(); MediaDescriptionCompat description = new MediaDescriptionCompat.Builder() + .setMediaUri(uri) .setMediaId(getResources().getString(R.string.queue_label)) .setTitle(getResources().getString(R.string.queue_label)) .build();