[Android] Fix repeat mode not restored

Geoffrey Métais git at videolan.org
Mon Feb 19 14:43:45 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb 19 14:43:30 2018 +0100| [ccc0729b52f6dcafeedf732495c4fdcd41b8d7ca] | committer: Geoffrey Métais

Fix repeat mode not restored

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

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

diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index 0d01f8d0f..3b7099a17 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -62,6 +62,10 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
 
     fun isValidPosition(position: Int) = position in 0 until mediaList.size()
 
+    init {
+        if (settings.getBoolean("audio_save_repeat", false)) repeating = settings.getInt(AUDIO_REPEAT_MODE_KEY, Constants.REPEAT_NONE)
+    }
+
     /**
      * Loads a selection of files (a non-user-supplied collection of media)
      * into the primary or "currently playing" playlist.



More information about the Android mailing list