Eleven: Avoid posting notification when service start id is invalid
Fixes stuck foreground service notification after MediaBrowserService
connects and disconnects from MusicPlaybackService.
Change-Id: I327b834b79c3a8e06340c01584f01256cafda8bd
diff --git a/src/org/lineageos/eleven/MusicPlaybackService.java b/src/org/lineageos/eleven/MusicPlaybackService.java
index 204d745..6f4aa0e 100644
--- a/src/org/lineageos/eleven/MusicPlaybackService.java
+++ b/src/org/lineageos/eleven/MusicPlaybackService.java
@@ -1623,7 +1623,7 @@
saveQueue(false);
}
- if (what.equals(PLAYSTATE_CHANGED) || what.equals(META_CHANGED)) {
+ if (mServiceStartId > 0 && (what.equals(PLAYSTATE_CHANGED) || what.equals(META_CHANGED))) {
updateNotification();
}