From 0c0e50d3ae2a0446e14f21231615089d798ae3fd Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Fri, 27 Sep 2019 12:03:36 +0200 Subject: [PATCH] Fixed another phantom service is running notification Steps to reproduce: - Send STOP key two times - Service starts foreground but does not stop again because stateManager does not know about foreground state --- .../antennapod/core/service/playback/PlaybackService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e479a7711..7d23b4c4c 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 @@ -451,7 +451,7 @@ public class PlaybackService extends MediaBrowserServiceCompat { notificationBuilder.loadIcon(getPlayable()); } } - startForeground(NOTIFICATION_ID, notificationBuilder.build()); + stateManager.startForeground(NOTIFICATION_ID, notificationBuilder.build()); } NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);