[Android] Fix PAUSED flag erased

Geoffrey Métais git at videolan.org
Tue Mar 26 15:40:30 CET 2019


vlc-android | branch: mr-49 | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar 26 15:40:11 2019 +0100| [0b566f7815917639ac11b9ccff9ae8d1c674d27d] | committer: Geoffrey Métais

Fix PAUSED flag erased

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

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

diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index 417ca50d0..52811a88f 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -162,15 +162,15 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
             repeating = settings.getInt(if (audio) "audio_repeating" else "media_repeating", REPEAT_NONE)
             val position = settings.getInt(if (audio) "position_in_audio_list" else "position_in_media_list", 0)
             savedTime = settings.getLong(if (audio) "position_in_song" else "position_in_media", -1)
+            if (!audio && position < playList.size && settings.getBoolean(PreferencesActivity.VIDEO_PAUSED, false)) {
+                playList[position].addFlags(MediaWrapper.MEDIA_PAUSED)
+            }
             load(playList, position, true)
+            loadingLastPlaylist = false
             if (!audio) {
-                if (position < playList.size && settings.getBoolean(PreferencesActivity.VIDEO_PAUSED, false)) {
-                    playList[position].addFlags(MediaWrapper.MEDIA_PAUSED)
-                }
                 val rate = settings.getFloat(PreferencesActivity.VIDEO_SPEED, player.getRate())
                 if (rate != 1.0f) player.setRate(rate, false)
             }
-            loadingLastPlaylist = false
         }
         return true
     }



More information about the Android mailing list