[Android] Getter for current playlist

Geoffrey Métais git at videolan.org
Tue Nov 22 11:30:07 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Nov 22 11:20:51 2016 +0100| [0c031a9b8530c6f671a0873f2fecc8bb49623215] | committer: Geoffrey Métais

Getter for current playlist

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

 vlc-android/src/org/videolan/vlc/media/MediaWrapperList.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/MediaWrapperList.java b/vlc-android/src/org/videolan/vlc/media/MediaWrapperList.java
index 3a44edf..01ed26a 100644
--- a/vlc-android/src/org/videolan/vlc/media/MediaWrapperList.java
+++ b/vlc-android/src/org/videolan/vlc/media/MediaWrapperList.java
@@ -26,6 +26,7 @@ import android.support.annotation.Nullable;
 import org.videolan.medialibrary.media.MediaWrapper;
 
 import java.util.ArrayList;
+import java.util.List;
 
 public class MediaWrapperList {
     private static final String TAG = "VLC/MediaWrapperList";
@@ -45,8 +46,8 @@ public class MediaWrapperList {
     private ArrayList<EventListener> mEventListenerList;
 
     public MediaWrapperList() {
-        mEventListenerList = new ArrayList<EventListener>();
-        mInternalList = new ArrayList<MediaWrapper>();
+        mEventListenerList = new ArrayList<>();
+        mInternalList = new ArrayList<>();
     }
 
     public void add(MediaWrapper media) {
@@ -151,6 +152,10 @@ public class MediaWrapperList {
         return mInternalList.get(position);
     }
 
+    public List<MediaWrapper> getAll() {
+        return mInternalList;
+    }
+
     /**
      * @param position The index of the media in the list
      * @return null if not found



More information about the Android mailing list