[Android] WatchNext: update when home is pressed

Duncan McNamara git at videolan.org
Mon Sep 27 06:03:24 UTC 2021


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Thu Sep  9 18:15:05 2021 +0200| [d41fe59d72eb38058ecc25474303a37e1a71778b] | committer: Nicolas Pomepuy

WatchNext: update when home is pressed

The boolean !audio is false when home is pressed but true when back is
pressed, because of this setResumeProgram was not called when pressing
home, and watch next was not updated

> https://code.videolan.org/videolan/vlc-android/commit/d41fe59d72eb38058ecc25474303a37e1a71778b
---

 application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index 5333e2b83..0ab41a50c 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -259,7 +259,9 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
             val audio = isAudioList() // check before dispatching in saveMediaMeta()
             launch(start = CoroutineStart.UNDISPATCHED) {
                 saveMediaMeta().join()
-                if (AndroidDevices.isAndroidTv && AndroidUtil.isOOrLater && !audio) setResumeProgram(service.applicationContext, it)
+                if (AndroidDevices.isAndroidTv && AndroidUtil.isOOrLater && video) {
+                    setResumeProgram(service.applicationContext, it)
+                }
             }
         }
         mediaList.removeEventListener(this)



More information about the Android mailing list