[Android] Fix MediaBrowser setup in FilePickerProvider

Geoffrey Métais git at videolan.org
Tue Jan 29 17:13:15 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jan 29 17:09:14 2019 +0100| [7d879ab5a916cce2de5ddafc15507a9bbb726c77] | committer: Geoffrey Métais

Fix MediaBrowser setup in FilePickerProvider

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

 .../src/org/videolan/vlc/providers/FilePickerProvider.kt       | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/providers/FilePickerProvider.kt b/vlc-android/src/org/videolan/vlc/providers/FilePickerProvider.kt
index 5e891e111..f1019451f 100644
--- a/vlc-android/src/org/videolan/vlc/providers/FilePickerProvider.kt
+++ b/vlc-android/src/org/videolan/vlc/providers/FilePickerProvider.kt
@@ -21,15 +21,11 @@
 package org.videolan.vlc.providers
 
 import android.content.Context
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.launch
-import kotlinx.coroutines.sync.withLock
 import org.videolan.libvlc.util.MediaBrowser
 import org.videolan.medialibrary.media.MediaLibraryItem
 import org.videolan.medialibrary.media.MediaWrapper
 import org.videolan.vlc.util.LiveDataset
 
-
 class FilePickerProvider(context: Context, dataset: LiveDataset<MediaLibraryItem>, url: String?) : FileBrowserProvider(context, dataset, url, true, false) {
 
     override fun getFlags(): Int {
@@ -38,11 +34,7 @@ class FilePickerProvider(context: Context, dataset: LiveDataset<MediaLibraryItem
 
     override fun initBrowser() {
         super.initBrowser()
-        launch(Dispatchers.IO) {
-            mutex.withLock {
-                mediabrowser?.setIgnoreFileTypes("db,nfo,ini,jpg,jpeg,ljpg,gif,png,pgm,pgmyuv,pbm,pam,tga,bmp,pnm,xpm,xcf,pcx,tif,tiff,lbm,sfv")
-            }
-        }
+        mediabrowser?.setIgnoreFileTypes("db,nfo,ini,jpg,jpeg,ljpg,gif,png,pgm,pgmyuv,pbm,pam,tga,bmp,pnm,xpm,xcf,pcx,tif,tiff,lbm,sfv")
     }
 
     override fun addMedia(media: MediaLibraryItem) {



More information about the Android mailing list