diff options
author | Joe Stein <joeaarons@gmail.com> | 2019-05-21 18:20:57 -0400 |
---|---|---|
committer | Joe Stein <joeaarons@gmail.com> | 2019-05-21 18:36:04 -0400 |
commit | effa17c41d614464593f0a95d320e5f3740fb9ac (patch) | |
tree | f30870e9711fb6f125c6a6eb7852957b9641ce90 | |
parent | 4f3fa6246e246391535f141823af1069da398b50 (diff) | |
download | AntennaPod-effa17c41d614464593f0a95d320e5f3740fb9ac.zip |
Fix scheduling tasks on shutdown executor
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java | 2 |
1 files changed, 1 insertions, 1 deletions
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, |