Properly update widget state when stopped (#7938)

This commit is contained in:
Hans-Peter Lehmann 2025-08-23 20:51:29 +02:00 committed by GitHub
parent c8cd0de157
commit 77888a12cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -319,6 +319,8 @@ public class PlaybackService extends MediaBrowserServiceCompat {
} }
} }
singleShotDisposables.clear(); singleShotDisposables.clear();
WidgetUpdater.updateWidget(getApplicationContext(), new WidgetUpdater.WidgetState(getPlayable(), getStatus(),
getCurrentPosition(), getDuration(), getCurrentPlaybackSpeed()));
stateManager.stopForeground(!UserPreferences.isPersistNotify()); stateManager.stopForeground(!UserPreferences.isPersistNotify());
isRunning = false; isRunning = false;
currentMediaType = MediaType.UNKNOWN; currentMediaType = MediaType.UNKNOWN;