[Android] Extract DB and thumbs folder names as constants

Geoffrey Métais git at videolan.org
Wed Apr 5 17:17:40 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr  5 17:04:44 2017 +0200| [70907972d28bc5ad86daf2f26b10a01d0f4bf7a4] | committer: Geoffrey Métais

Extract DB and thumbs folder names as constants

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

 medialibrary/src/org/videolan/medialibrary/Medialibrary.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
index 3463db2..42fd8f8 100644
--- a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
+++ b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
@@ -43,6 +43,8 @@ public class Medialibrary {
     private static final String extDirPath = Environment.getExternalStorageDirectory().getAbsolutePath();
 
     private static final MediaWrapper[] EMPTY_COLLECTION = {};
+    public static final String VLC_MEDIA_DB_NAME = "/vlc_media.db";
+    public static final String THUMBS_FOLDER_NAME = "/thumbs";
 
     private long mInstanceID;
     private volatile boolean mIsInitiated = false;
@@ -68,7 +70,7 @@ public class Medialibrary {
     }
 
     public boolean init(Context context) {
-        mIsInitiated = nativeInit(context.getCacheDir()+"/vlc_media.db", context.getExternalFilesDir(null).getAbsolutePath()+"/thumbs");
+        mIsInitiated = nativeInit(context.getCacheDir()+ VLC_MEDIA_DB_NAME, context.getExternalFilesDir(null).getAbsolutePath()+ THUMBS_FOLDER_NAME);
         return mIsInitiated;
     }
 



More information about the Android mailing list