forked from upstream-mirrors/quik
add expedited worker getForegroundInfo()/notification for android platform versions older than 12
This commit is contained in:
@@ -90,6 +90,18 @@ class NotificationManagerImpl @Inject constructor(
|
||||
createNotificationChannel()
|
||||
}
|
||||
|
||||
override fun getForegroundNotificationForWorkersOnOlderAndroids() =
|
||||
NotificationCompat.Builder(context, DEFAULT_CHANNEL_ID)
|
||||
.setContentTitle(context.getString(R.string.notification_foreground_worker_text))
|
||||
.setShowWhen(false)
|
||||
.setWhen(System.currentTimeMillis())
|
||||
.setSmallIcon(R.drawable.ic_notification)
|
||||
.setColor(colors.theme().theme)
|
||||
.setCategory(NotificationCompat.CATEGORY_MESSAGE)
|
||||
.setPriority(NotificationCompat.PRIORITY_MIN)
|
||||
.setOngoing(true)
|
||||
.build()
|
||||
|
||||
/**
|
||||
* Updates the notification for a particular conversation
|
||||
*/
|
||||
|
||||
@@ -487,6 +487,7 @@
|
||||
</plurals>
|
||||
<string name="notification_message_failed_title">Message not sent</string>
|
||||
<string name="notification_message_failed_text">The message to %s failed to send</string>
|
||||
<string name="notification_foreground_worker_text">Receiving message</string>
|
||||
|
||||
<string-array name="night_modes">
|
||||
<item>System</item>
|
||||
|
||||
Reference in New Issue
Block a user