mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-25 08:21:59 +01:00
Fix scheduling tasks on shutdown executor
This commit is contained in:
parent
4f3fa6246e
commit
effa17c41d
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user