[Android] remove useless broken code

Sébastien Toque git at videolan.org
Mon Nov 26 20:29:08 CET 2012


vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Mon Nov 26 20:28:50 2012 +0100| [599764831c1a91c93764ba4387af8e570ff73cdc] | committer: Sébastien Toque

remove useless broken code

You can't modify a List while reading it !!!

anyway, offline directories are already handled in finally scope.
They will be removed from DB if the external storage is mounted.

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=599764831c1a91c93764ba4387af8e570ff73cdc
---

 vlc-android/src/org/videolan/vlc/MediaLibrary.java |    9 ---------
 1 file changed, 9 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaLibrary.java b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
index 08d3b67..cd85042 100644
--- a/vlc-android/src/org/videolan/vlc/MediaLibrary.java
+++ b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
@@ -198,14 +198,6 @@ public class MediaLibrary {
             MainActivity.showProgressBar(mContext);
 
             List<File> mediaDirs = DBManager.getMediaDirs();
-
-            // Remove directories currently offline (on removable storage) or deleted
-            //FIXME How do we treat removed directories vs offline directories?
-            for (File f : mediaDirs) {
-                if (!f.exists())
-                    mediaDirs.remove(f);
-            }
-
             if (mediaDirs.size() == 0) {
                 // Use all available storage directories as our default
                 String storageDirs[] = Util.getStorageDirectories();
@@ -215,7 +207,6 @@ public class MediaLibrary {
                         mediaDirs.add(f);
                 }
             }
-
             directories.addAll(mediaDirs);
 
             // get all existing media items



More information about the Android mailing list