Merge "Add check for null actions" into rvc-dev am: 4cb4f934be am: 798891f485

Change-Id: I071c2cb6a52ef6bfefb93b8f1ecf2c805c78acf4
This commit is contained in:
TreeHugger Robot
2020-05-16 02:19:10 +00:00
committed by Automerger Merge Worker

View File

@@ -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,