small cleanup
This commit is contained in:
parent
8a91d31c24
commit
d7cd24b3d0
1 changed files with 2 additions and 2 deletions
|
|
@ -274,7 +274,7 @@ class NotificationFactory @Inject constructor(
|
||||||
.setContentTitle(buildMeta.applicationName)
|
.setContentTitle(buildMeta.applicationName)
|
||||||
.setContentText(stringProvider.getString(R.string.notification_test_push_notification_content))
|
.setContentText(stringProvider.getString(R.string.notification_test_push_notification_content))
|
||||||
.setSmallIcon(R.drawable.ic_notification)
|
.setSmallIcon(R.drawable.ic_notification)
|
||||||
.setLargeIcon(getBitmap(context, R.drawable.element_logo_green))
|
.setLargeIcon(getBitmap(R.drawable.element_logo_green))
|
||||||
.setColor(ContextCompat.getColor(context, R.color.notification_accent_color))
|
.setColor(ContextCompat.getColor(context, R.color.notification_accent_color))
|
||||||
.setPriority(NotificationCompat.PRIORITY_MAX)
|
.setPriority(NotificationCompat.PRIORITY_MAX)
|
||||||
.setCategory(NotificationCompat.CATEGORY_STATUS)
|
.setCategory(NotificationCompat.CATEGORY_STATUS)
|
||||||
|
|
@ -283,7 +283,7 @@ class NotificationFactory @Inject constructor(
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getBitmap(context: Context, @DrawableRes drawableRes: Int): Bitmap? {
|
private fun getBitmap(@DrawableRes drawableRes: Int): Bitmap? {
|
||||||
val drawable = ResourcesCompat.getDrawable(context.resources, drawableRes, null) ?: return null
|
val drawable = ResourcesCompat.getDrawable(context.resources, drawableRes, null) ?: return null
|
||||||
val canvas = Canvas()
|
val canvas = Canvas()
|
||||||
val bitmap = Bitmap.createBitmap(drawable.intrinsicWidth, drawable.intrinsicHeight, Bitmap.Config.ARGB_8888)
|
val bitmap = Bitmap.createBitmap(drawable.intrinsicWidth, drawable.intrinsicHeight, Bitmap.Config.ARGB_8888)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue