diff options
author | ByteHamster <info@bytehamster.com> | 2019-09-27 12:03:36 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-09-27 12:03:39 +0200 |
commit | 0c0e50d3ae2a0446e14f21231615089d798ae3fd (patch) | |
tree | 68a662c31a9363dbd326b3769709d89758190e2d | |
parent | f9e7e9aeb67e739f9d72f787a05a083ff81a5dbc (diff) | |
download | AntennaPod-0c0e50d3ae2a0446e14f21231615089d798ae3fd.zip |
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
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java | 2 |
1 files changed, 1 insertions, 1 deletions
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); |