From e6ad131d3737dbc13d25195b8ce0ec13e561307d Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Fri, 30 Aug 2019 10:27:24 +0200 Subject: [PATCH] Added media details to dummy notification --- .../antennapod/core/service/playback/PlaybackService.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java index 6dd29ae3a..197302ed2 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java @@ -444,6 +444,12 @@ public class PlaybackService extends MediaBrowserServiceCompat { if (!stateManager.isInForeground()) { PlaybackServiceNotificationBuilder notificationBuilder = new PlaybackServiceNotificationBuilder(this); + if (mediaPlayer != null && getPlayable() != null) { + notificationBuilder.addMetadata(getPlayable(), mediaSession.getSessionToken(), getStatus(), isCasting); + if (notificationBuilder.isIconCached(getPlayable())) { + notificationBuilder.loadIcon(getPlayable()); + } + } startForeground(NOTIFICATION_ID, notificationBuilder.build()); }