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

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

View File

@@ -54,7 +54,7 @@ private const val DEFAULT_LUMINOSITY = 0.25f
private const val LUMINOSITY_THRESHOLD = 0.05f
private const val SATURATION_MULTIPLIER = 0.8f
private val LOADING = MediaData(false, 0, null, null, null, null, null,
private val LOADING = MediaData(false, 0, null, null, null, null, null,
emptyList(), emptyList(), null, null, null)
/**
@@ -191,12 +191,14 @@ class MediaDataManager @Inject constructor(
// TODO: b/153736623 look into creating actions when this isn't a media style notification
val packageContext: Context = sbn.getPackageContext(context)
for (action in actions) {
val mediaAction = MediaAction(
action.getIcon().loadDrawable(packageContext),
action.actionIntent,
action.title)
actionIcons.add(mediaAction)
if (actions != null) {
for (action in actions) {
val mediaAction = MediaAction(
action.getIcon().loadDrawable(packageContext),
action.actionIntent,
action.title)
actionIcons.add(mediaAction)
}
}
foregroundExcecutor.execute {