[Android] Set dir type explicitly for favorites

Geoffrey Métais git at videolan.org
Fri Mar 27 16:43:47 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Mar 27 16:38:45 2015 +0100| [a838b35b8ff152aa6d6f374c144053afc743ac38] | committer: Geoffrey Métais

Set dir type explicitly for favorites

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

 vlc-android/src/org/videolan/vlc/MediaDatabase.java |    1 +
 vlc-android/src/org/videolan/vlc/MediaWrapper.java  |    4 ++++
 2 files changed, 5 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/MediaDatabase.java b/vlc-android/src/org/videolan/vlc/MediaDatabase.java
index be57b41..09c57ec 100644
--- a/vlc-android/src/org/videolan/vlc/MediaDatabase.java
+++ b/vlc-android/src/org/videolan/vlc/MediaDatabase.java
@@ -1061,6 +1061,7 @@ public class MediaDatabase {
         while (cursor.moveToNext()) {
             mw = new MediaWrapper(Uri.decode(cursor.getString(0)));
             mw.setTitle(Uri.decode(cursor.getString(1)));
+            mw.setType(MediaWrapper.TYPE_DIR);
             favs.add(mw);
         }
         cursor.close();
diff --git a/vlc-android/src/org/videolan/vlc/MediaWrapper.java b/vlc-android/src/org/videolan/vlc/MediaWrapper.java
index 76cc197..ea318a8 100644
--- a/vlc-android/src/org/videolan/vlc/MediaWrapper.java
+++ b/vlc-android/src/org/videolan/vlc/MediaWrapper.java
@@ -264,6 +264,10 @@ public class MediaWrapper implements Parcelable {
         return mType;
     }
 
+    public void setType(int type){
+        mType = type;
+    }
+
     public int getWidth() {
         return mWidth;
     }



More information about the Android mailing list