[Android] SMB discovery for debug only

Geoffrey Métais git at videolan.org
Wed Apr 22 17:19:50 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr 22 16:30:04 2015 +0200| [d464b77fd6f3bfd1b3e94c126a2c2c84c597f358] | committer: Geoffrey Métais

SMB discovery for debug only

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

 libvlc/src/org/videolan/libvlc/util/MediaBrowser.java |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java b/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java
index 25df1f4..05ee20c 100644
--- a/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java
+++ b/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java
@@ -20,8 +20,11 @@
 
 package org.videolan.libvlc.util;
 
+import android.os.Build;
+
 import java.util.ArrayList;
 
+import org.videolan.BuildConfig;
 import org.videolan.libvlc.LibVLC;
 import org.videolan.libvlc.Media;
 import org.videolan.libvlc.MediaDiscoverer;
@@ -31,12 +34,12 @@ import org.videolan.libvlc.VLCObject;
 public class MediaBrowser {
     private static final String TAG = "LibVLC/util/MediaBrowser";
 
-    private static final String[] DISCOVERER_LIST = {
+    private static final String[] DISCOVERER_LIST = BuildConfig.DEBUG ? new String[]{
         "dsm", // Netbios discovery via libdsm
         "upnp",
         // "bonjour",
         //  "mdns"
-    };
+    } : new String[]{"upnp"} ; //Only UPnP for release
 
     private LibVLC mLibVlc;
     private ArrayList<MediaDiscoverer> mMediaDiscoverers = new ArrayList<MediaDiscoverer>();
@@ -72,6 +75,7 @@ public class MediaBrowser {
     public MediaBrowser(LibVLC libvlc, EventListener listener) {
         mLibVlc = libvlc; // XXX mLibVlc.retain();
         mEventListener = listener;
+
     }
 
     private synchronized void reset() {



More information about the Android mailing list