فهرست منبع

change .so to /assets/cores

wangyongj 2 سال پیش
والد
کامیت
83127e4063
1فایلهای تغییر یافته به همراه10 افزوده شده و 2 حذف شده
  1. 10 2
      app/src/main/java/com/xugame/gameconsole/TextCopyFileActivity.java

+ 10 - 2
app/src/main/java/com/xugame/gameconsole/TextCopyFileActivity.java

@@ -162,10 +162,18 @@ public class TextCopyFileActivity extends Activity {
     }
 
     private boolean copyFile(String file_path, String fileName) {
-        Log.i(TAG, "copyFile" + "filepath=" + file_path);
+        Log.i(TAG, "copyFile" + "filepath=" + file_path+"filename="+fileName);
+        try {
+            String fileNames[] = this.getAssets().list("cores");
+            for (int i=0;i<fileNames.length;i++)
+                Log.i(TAG,"name="+fileNames[i]);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        Log.i(TAG,"");
         try {
             InputStream in = null;
-            in = this.getResources().getAssets().open(fileName);
+            in = this.getResources().getAssets().open("cores/"+fileName);
             BufferedOutputStream outStream
                     = new BufferedOutputStream(new FileOutputStream(file_path, false));
             byte[] buffer = new byte[1024];