[Android] Don't determine next index during media transition

Geoffrey Métais git at videolan.org
Fri May 11 16:22:12 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri May 11 16:04:48 2018 +0200| [877dc58f42d705283b162a79ea05143b20bfff01] | committer: Geoffrey Métais

Don't determine next index during media transition

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

 vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index 27ca211cc..c4f7a5f37 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -680,11 +680,8 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
             MediaPlayer.Event.EndReached -> {
                 saveMediaMeta()
                 if (isBenchmark) player.setPreviousStats()
-                launch(UI, CoroutineStart.UNDISPATCHED) {
-                    determinePrevAndNextIndices(true)
-                    if (nextIndex == -1) savePosition(true)
-                    next()
-                }
+                if (nextIndex == -1) savePosition(true)
+                next()
             }
             MediaPlayer.Event.EncounteredError -> {
                 service.showToast(service.getString(



More information about the Android mailing list