Do not try to display notification two times

The Thread is interrupted which leads to an empty notification
This commit is contained in:
ByteHamster 2019-05-17 14:34:48 +02:00
parent 7c4b98be59
commit 1f8f2be9ab
1 changed files with 1 additions and 2 deletions

View File

@ -497,7 +497,6 @@ public class PlaybackService extends MediaBrowserServiceCompat {
}
mediaPlayer.playMediaObject(playable, stream, startWhenPrepared, prepareImmediately);
}
setupNotification(playable);
}
return Service.START_NOT_STICKY;
@ -1218,7 +1217,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
notificationSetupThread.interrupt();
}
if (playable == null) {
Log.d(TAG, "setupNotification: playable is null");
Log.d(TAG, "setupNotification: playable is null" + Log.getStackTraceString(new Exception()));
if (!started) {
stopService();
}