Fix reappearing notification

This commit is contained in:
tzugen 2022-06-07 16:00:51 +02:00
parent 59e37e62a6
commit 147d7cd46e
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
1 changed files with 0 additions and 10 deletions

View File

@ -100,19 +100,9 @@ internal class MediaNotificationProvider(context: Context) :
builder.setLargeIcon(artworkBitmap)
}
val mediaStyle = androidx.media.app.NotificationCompat.MediaStyle()
.setCancelButtonIntent(
actionFactory.createMediaActionPendingIntent(
ActionFactory.COMMAND_STOP
)
)
.setShowActionsInCompactView(0, 1, 2)
val notification: Notification = builder
.setContentIntent(mediaController.sessionActivity)
.setDeleteIntent(
actionFactory.createMediaActionPendingIntent(
ActionFactory.COMMAND_STOP
)
)
.setOnlyAlertOnce(true)
.setSmallIcon(getSmallIconResId())
.setStyle(mediaStyle)