[Android] Always force foreground when resuming the last play queue
Nicolas Pomepuy
git at videolan.org
Fri May 6 09:30:46 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon May 2 07:53:09 2022 +0200| [9b279a1913465dd68a83a533673a9e714b8c21e9] | committer: Duncan McNamara
Always force foreground when resuming the last play queue
Fixes a RemoteServiceException when trying to resume a non playable
play queue from the widget (and probably BT headset)
> https://code.videolan.org/videolan/vlc-android/commit/9b279a1913465dd68a83a533673a9e714b8c21e9
---
application/vlc-android/src/org/videolan/vlc/PlaybackService.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
index 18c81e7dd..7fbdceb30 100644
--- a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
+++ b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
@@ -1241,8 +1241,8 @@ class PlaybackService : MediaBrowserServiceCompat(), LifecycleOwner, CoroutineSc
}
fun loadLastPlaylist(type: Int) {
+ forceForeground(true)
if (!playlistManager.loadLastPlaylist(type)) {
- forceForeground(true)
Toast.makeText(this, getString(R.string.resume_playback_error), Toast.LENGTH_LONG).show()
stopService(Intent(applicationContext, PlaybackService::class.java))
}
More information about the Android
mailing list