From effa17c41d614464593f0a95d320e5f3740fb9ac Mon Sep 17 00:00:00 2001 From: Joe Stein Date: Tue, 21 May 2019 18:20:57 -0400 Subject: [PATCH] Fix scheduling tasks on shutdown executor --- .../core/service/playback/PlaybackServiceTaskManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java index a464d74f1..68839023e 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java @@ -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,