Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
05a4526e
authored
Nov 17, 2021
by
Don Turner
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Display album artwork in media notifications
parent
609cf023
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
demos/session/src/main/java/androidx/media3/demo/session/MediaItemTree.kt
demos/session/src/main/java/androidx/media3/demo/session/MediaItemTree.kt
View file @
05a4526e
...
@@ -69,6 +69,7 @@ object MediaItemTree {
...
@@ -69,6 +69,7 @@ object MediaItemTree {
artist
:
String
?
=
null
,
artist
:
String
?
=
null
,
genre
:
String
?
=
null
,
genre
:
String
?
=
null
,
sourceUri
:
Uri
?
=
null
,
sourceUri
:
Uri
?
=
null
,
imageUri
:
Uri
?
=
null
,
):
MediaItem
{
):
MediaItem
{
// TODO(b/194280027): add artwork
// TODO(b/194280027): add artwork
val
metadata
=
val
metadata
=
...
@@ -79,6 +80,7 @@ object MediaItemTree {
...
@@ -79,6 +80,7 @@ object MediaItemTree {
.
setGenre
(
genre
)
.
setGenre
(
genre
)
.
setFolderType
(
folderType
)
.
setFolderType
(
folderType
)
.
setIsPlayable
(
isPlayable
)
.
setIsPlayable
(
isPlayable
)
.
setArtworkUri
(
imageUri
)
.
build
()
.
build
()
return
MediaItem
.
Builder
()
return
MediaItem
.
Builder
()
.
setMediaId
(
mediaId
)
.
setMediaId
(
mediaId
)
...
@@ -155,6 +157,7 @@ object MediaItemTree {
...
@@ -155,6 +157,7 @@ object MediaItemTree {
val
artist
=
mediaObject
.
getString
(
"artist"
)
val
artist
=
mediaObject
.
getString
(
"artist"
)
val
genre
=
mediaObject
.
getString
(
"genre"
)
val
genre
=
mediaObject
.
getString
(
"genre"
)
val
sourceUri
=
Uri
.
parse
(
mediaObject
.
getString
(
"source"
))
val
sourceUri
=
Uri
.
parse
(
mediaObject
.
getString
(
"source"
))
val
imageUri
=
Uri
.
parse
(
mediaObject
.
getString
(
"image"
))
// key of such items in tree
// key of such items in tree
val
idInTree
=
ITEM_PREFIX
+
id
val
idInTree
=
ITEM_PREFIX
+
id
val
albumFolderIdInTree
=
ALBUM_PREFIX
+
album
val
albumFolderIdInTree
=
ALBUM_PREFIX
+
album
...
@@ -171,6 +174,7 @@ object MediaItemTree {
...
@@ -171,6 +174,7 @@ object MediaItemTree {
artist
=
artist
,
artist
=
artist
,
genre
=
genre
,
genre
=
genre
,
sourceUri
=
sourceUri
,
sourceUri
=
sourceUri
,
imageUri
=
imageUri
,
folderType
=
FOLDER_TYPE_NONE
folderType
=
FOLDER_TYPE_NONE
)
)
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment