[Android] Playback: open ContentResolver from IO threadpool

Geoffrey Métais git at videolan.org
Fri Feb 1 14:01:05 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb  1 13:41:34 2019 +0100| [22104c37358ab2dd7ba242e51c86b4c4218f52f5] | committer: Geoffrey Métais

Playback: open ContentResolver from IO threadpool

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

 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 e987fcaa1..5b99bcaf2 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -288,7 +288,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
             skipMedia()
         } else if (mw.type != MediaWrapper.TYPE_VIDEO || isVideoPlaying || player.hasRenderer
                 || mw.hasFlag(MediaWrapper.MEDIA_FORCE_AUDIO)) {
-            val uri = FileUtils.getUri(mw.uri)
+            val uri = withContext(Dispatchers.IO) { FileUtils.getUri(mw.uri) }
             if (uri == null) {
                 skipMedia()
                 return



More information about the Android mailing list