Merge "Add check for null actions" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4cb4f934be
@@ -191,6 +191,7 @@ class MediaDataManager @Inject constructor(
|
|||||||
// TODO: b/153736623 look into creating actions when this isn't a media style notification
|
// TODO: b/153736623 look into creating actions when this isn't a media style notification
|
||||||
|
|
||||||
val packageContext: Context = sbn.getPackageContext(context)
|
val packageContext: Context = sbn.getPackageContext(context)
|
||||||
|
if (actions != null) {
|
||||||
for (action in actions) {
|
for (action in actions) {
|
||||||
val mediaAction = MediaAction(
|
val mediaAction = MediaAction(
|
||||||
action.getIcon().loadDrawable(packageContext),
|
action.getIcon().loadDrawable(packageContext),
|
||||||
@@ -198,6 +199,7 @@ class MediaDataManager @Inject constructor(
|
|||||||
action.title)
|
action.title)
|
||||||
actionIcons.add(mediaAction)
|
actionIcons.add(mediaAction)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foregroundExcecutor.execute {
|
foregroundExcecutor.execute {
|
||||||
onMediaDataLoaded(key, MediaData(true, bgColor, app, smallIconDrawable, artist, song,
|
onMediaDataLoaded(key, MediaData(true, bgColor, app, smallIconDrawable, artist, song,
|
||||||
|
|||||||
Reference in New Issue
Block a user