Fix scheduling tasks on shutdown executor

This commit is contained in:
Joe Stein 2019-05-21 18:20:57 -04:00
parent 4f3fa6246e
commit effa17c41d
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ public class PlaybackServiceTaskManager {
* Starts the widget updater task. If the widget updater is already active, nothing will happen.
*/
public synchronized void startWidgetUpdater() {
if (!isWidgetUpdaterActive()) {
if (!isWidgetUpdaterActive() && !schedExecutor.isShutdown()) {
Runnable widgetUpdater = callback::onWidgetUpdaterTick;
widgetUpdater = useMainThreadIfNecessary(widgetUpdater);
widgetUpdaterFuture = schedExecutor.scheduleWithFixedDelay(widgetUpdater, WIDGET_UPDATER_NOTIFICATION_INTERVAL,