[Android] Try to open unknow files from browser

Geoffrey Métais git at videolan.org
Tue May 19 15:06:21 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue May 19 15:05:34 2015 +0200| [455a98c50b52b775751d46f6294cea3d0aeac5f6] | committer: Geoffrey Métais

Try to open unknow files from browser

fixes #14483

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

 .../src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java       |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
index 38b9a57..8e1dac9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
@@ -120,7 +120,7 @@ public class BaseBrowserAdapter extends  RecyclerView.Adapter<RecyclerView.ViewH
                     fragment.browse(mw, holder.getAdapterPosition());
                 else if (mw.getType() == MediaWrapper.TYPE_VIDEO)
                     Util.openMedia(v.getContext(), mw);
-                else {
+                else  if (mw.getType() == MediaWrapper.TYPE_AUDIO) {
                     int position = 0;
                     LinkedList<MediaWrapper> mediaLocations = new LinkedList<MediaWrapper>();
                     MediaWrapper mediaItem;
@@ -134,6 +134,8 @@ public class BaseBrowserAdapter extends  RecyclerView.Adapter<RecyclerView.ViewH
                             }
                         }
                     Util.openList(v.getContext(), mediaLocations, position);
+                } else {
+                    Util.openStream(v.getContext(), mw.getLocation());
                 }
             }
         });



More information about the Android mailing list