From a49d3f4c6b68c25dca69363078b6fd9211e59a5a Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 27 十二月 2023 16:09:39 +0800
Subject: [PATCH] 0312 绝峰使用海外sdk
---
SdkProject/library/src/main/java/com/secondworld/sdk/utils/FileUtil.java | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/SdkProject/library/src/main/java/com/secondworld/sdk/utils/FileUtil.java b/SdkProject/library/src/main/java/com/secondworld/sdk/utils/FileUtil.java
index 8cefb12..443a481 100644
--- a/SdkProject/library/src/main/java/com/secondworld/sdk/utils/FileUtil.java
+++ b/SdkProject/library/src/main/java/com/secondworld/sdk/utils/FileUtil.java
@@ -2,7 +2,7 @@
import android.content.res.AssetManager;
-import com.secondworld.sdk.GameApp;
+import com.secondworld.sdk.GameAppProxy;
import com.secondworld.sdk.UnityMsgHandler;
import java.io.File;
@@ -37,8 +37,8 @@
return;
}
- String _dest = GameApp.I.getExternalFilesDir("").getAbsolutePath();
- AssetManager _assetMgr = GameApp.I.getAssets();
+ String _dest = GameAppProxy.app.getExternalFilesDir("").getAbsolutePath();
+ AssetManager _assetMgr = GameAppProxy.app.getAssets();
try {
String[] _fileNames = _assetMgr.list("android");
if (_fileNames != null) {
@@ -64,7 +64,7 @@
*/
public static void copyOneAsset(String fileName) {
String originalPath = "android" + File.separator + fileName;
- String destPath = GameApp.I.getExternalFilesDir(
+ String destPath = GameAppProxy.app.getExternalFilesDir(
"").getAbsolutePath() + File.separator + fileName;
String _destDir = destPath.substring(0, destPath.lastIndexOf('/') + 1);
File _file = new File(_destDir);
@@ -72,7 +72,7 @@
boolean mkdir = _file.mkdir();
}
try {
- InputStream _is = GameApp.I.getAssets().open(originalPath);
+ InputStream _is = GameAppProxy.app.getAssets().open(originalPath);
FileOutputStream _fos = new FileOutputStream(new File(destPath));
byte[] _buffer = new byte[1024];
int _byteCount;
@@ -89,7 +89,7 @@
public static void copy(String original, String dest) {
try {
- String[] fileNames = GameApp.I.getAssets().list(original);
+ String[] fileNames = GameAppProxy.app.getAssets().list(original);
if (fileNames.length > 0) {
File dir = new File(dest);
String mkdir = dir.mkdir() ? "鎴愬姛" : "澶辫触";
@@ -99,7 +99,7 @@
dest + File.separator + _fileName);
}
} else {
- InputStream _is = GameApp.I.getAssets().open(original);
+ InputStream _is = GameAppProxy.app.getAssets().open(original);
FileOutputStream _fos = new FileOutputStream(new File(dest));
byte[] _buffer = new byte[1024];
int _byteCount;
--
Gitblit v1.8.0