[Android] Ensure last playlist locations encoding is correct

Geoffrey Métais git at videolan.org
Wed Mar 7 15:22:37 CET 2018


vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Mar  2 09:18:03 2018 +0100| [fbee081409c550f508df77c4a248ba90a982a31e] | committer: Geoffrey Métais

Ensure last playlist locations encoding is correct

(cherry picked from commit 9172cbfe3072582ecd8aa00cd5f15a422fd5df96)

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

 vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index ef53f1afc..e9bb7731c 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -407,7 +407,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
     private fun saveMediaList() {
         if (getCurrentMedia() === null) return
         val locations = StringBuilder()
-        for (mw in mediaList.all) locations.append(" ").append(mw.uri.toString())
+        for (mw in mediaList.all) locations.append(" ").append(Uri.encode(Uri.decode(mw.uri.toString())))
         //We save a concatenated String because putStringSet is APIv11.
         settings.edit()
                 .putString(if (!isAudioList()) "media_list" else "audio_list", locations.toString().trim { it <= ' ' })



More information about the Android mailing list