add an icon to the Android Auto queue
This commit is contained in:
parent
4b252250c0
commit
a8fbb97cfe
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue