[Android] [PATCH 2/5] MediaLibrary: remove unused method

Thomas Guillem thomas at gllm.fr
Tue Dec 30 17:36:02 CET 2014


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

diff --git a/vlc-android/src/org/videolan/vlc/MediaLibrary.java b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
index 4a495bd..dce7540 100644
--- a/vlc-android/src/org/videolan/vlc/MediaLibrary.java
+++ b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
@@ -37,7 +37,6 @@ import org.videolan.libvlc.LibVLC;
 import org.videolan.libvlc.LibVlcException;
 import org.videolan.libvlc.Media;
 import org.videolan.vlc.gui.MainActivity;
-import org.videolan.vlc.gui.audio.AudioBrowserFragment;
 import org.videolan.vlc.util.AndroidDevices;
 import org.videolan.vlc.util.Util;
 import org.videolan.vlc.util.VLCInstance;
@@ -152,36 +151,6 @@ public class MediaLibrary {
         return audioItems;
     }
 
-    public ArrayList<Media> getAudioItems(String name, String name2, int mode) {
-        ArrayList<Media> audioItems = new ArrayList<Media>();
-        mItemListLock.readLock().lock();
-        for (int i = 0; i < mItemList.size(); i++) {
-            Media item = mItemList.get(i);
-            if (item.getType() == Media.TYPE_AUDIO) {
-
-                boolean valid = false;
-                switch (mode) {
-                    case AudioBrowserFragment.MODE_ARTIST:
-                        valid = name.equals(item.getArtist()) && (name2 == null || name2.equals(item.getAlbum()));
-                        break;
-                    case AudioBrowserFragment.MODE_ALBUM:
-                        valid = name.equals(item.getAlbum());
-                        break;
-                    case AudioBrowserFragment.MODE_GENRE:
-                        valid = name.equals(item.getGenre()) && (name2 == null || name2.equals(item.getAlbum()));
-                        break;
-                    default:
-                        break;
-                }
-                if (valid)
-                    audioItems.add(item);
-
-            }
-        }
-        mItemListLock.readLock().unlock();
-        return audioItems;
-    }
-
     public ArrayList<Media> getMediaItems() {
         return mItemList;
     }
-- 
2.1.3



More information about the Android mailing list