[Android] [PATCH 02/10] Method changeEventListener for MediaBrowser

Geoffrey Métais geoffrey.metais at gmail.com
Mon Apr 20 10:49:48 CEST 2015


---
 libvlc/src/org/videolan/libvlc/util/MediaBrowser.java | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java b/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java
index 97ef383..25df1f4 100644
--- a/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java
+++ b/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java
@@ -95,6 +95,15 @@ public class MediaBrowser {
         reset();
     }
 
+    /**
+     * Reset this media browser and register a new EventListener
+     * @param eventListener new EventListener for this browser
+     */
+    public synchronized void changeEventListener(EventListener eventListener){
+        reset();
+        mEventListener = eventListener;
+    }
+
     private void startMediaDiscoverer(String discovererName) {
         MediaDiscoverer md = new MediaDiscoverer(mLibVlc, discovererName);
         mMediaDiscoverers.add(md);
-- 
2.1.0



More information about the Android mailing list