[Android] Add insertItem method to PlaybackService

Geoffrey Métais git at videolan.org
Wed Jan 6 16:47:27 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jan  6 16:37:32 2016 +0100| [ed1187de797c296e7f9cd6d477b2c17b43209926] | committer: Geoffrey Métais

Add insertItem method to PlaybackService

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

 vlc-android/src/org/videolan/vlc/PlaybackService.java | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 5dd0a3d..454c2da 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1733,6 +1733,13 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
         Log.d(TAG, "moveItem " + positionStart + " -> " + positionEnd);
     }
 
+    @MainThread
+    public void insertItem(int position, MediaWrapper mw) {
+        mMediaList.insert(position, mw);
+        saveMediaList();
+        determinePrevAndNextIndices();
+    }
+
 
     @MainThread
     public void remove(int position) {



More information about the Android mailing list