Merge "Add check for null actions" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4cb4f934be
@@ -54,7 +54,7 @@ private const val DEFAULT_LUMINOSITY = 0.25f
|
|||||||
private const val LUMINOSITY_THRESHOLD = 0.05f
|
private const val LUMINOSITY_THRESHOLD = 0.05f
|
||||||
private const val SATURATION_MULTIPLIER = 0.8f
|
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)
|
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
|
// 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)
|
||||||
for (action in actions) {
|
if (actions != null) {
|
||||||
val mediaAction = MediaAction(
|
for (action in actions) {
|
||||||
action.getIcon().loadDrawable(packageContext),
|
val mediaAction = MediaAction(
|
||||||
action.actionIntent,
|
action.getIcon().loadDrawable(packageContext),
|
||||||
action.title)
|
action.actionIntent,
|
||||||
actionIcons.add(mediaAction)
|
action.title)
|
||||||
|
actionIcons.add(mediaAction)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foregroundExcecutor.execute {
|
foregroundExcecutor.execute {
|
||||||
|
|||||||
Reference in New Issue
Block a user