Commit 663a02d1 authored by Geoffrey Métais's avatar Geoffrey Métais

Copy lua folder from assets to device

TODO: change destination directory
parent 3b3c55a1
......@@ -22,6 +22,7 @@ package org.videolan.vlc.util;
import android.content.Context;
import android.content.Intent;
import android.content.res.AssetManager;
import android.os.Build;
import android.util.Log;
......@@ -42,6 +43,16 @@ public class VLCInstance {
private static LibVLC sLibVLC = null;
private static Runnable sCopyLua = new Runnable() {
@Override
public void run() {
String destinationFolder = AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY+
"/Android/data/"+VLCApplication.getAppContext().getPackageName()+"/lua";
AssetManager am = VLCApplication.getAppResources().getAssets();
FileUtils.copyAssetFolder(am, "lua", destinationFolder);
}
};
public static void linkCompatLib(Context context) {
final File outDir = new File(context.getFilesDir(), "compat");
if (!outDir.exists())
......@@ -110,6 +121,8 @@ public class VLCInstance {
context.startActivity(i);
}
});
VLCApplication.runBackground(sCopyLua);
}
return sLibVLC;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment