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
This commit is contained in:
ByteHamster 2019-09-27 12:03:36 +02:00
parent f9e7e9aeb6
commit 0c0e50d3ae
1 changed files with 1 additions and 1 deletions

View File

@ -451,7 +451,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
notificationBuilder.loadIcon(getPlayable()); notificationBuilder.loadIcon(getPlayable());
} }
} }
startForeground(NOTIFICATION_ID, notificationBuilder.build()); stateManager.startForeground(NOTIFICATION_ID, notificationBuilder.build());
} }
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this); NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);