强更替换为appUpdate库。

This commit is contained in:
2025-12-23 18:20:25 +08:00
parent bb54407c62
commit 214c339e93
39 changed files with 2503 additions and 18 deletions

View File

@@ -9,7 +9,6 @@ import android.os.Looper;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.util.Log;
import com.alibaba.android.arouter.utils.TextUtils;
import com.blankj.utilcode.util.FileUtils;
@@ -230,14 +229,14 @@ public class DownloadUtil {
}
}
if (TextUtils.isEmpty(mApkPath)) {
Log.e(TAG, "downloadApk: 存储路径为空了");
LogUtils.e(TAG, "downloadApk: 存储路径为空了");
return;
}
//建立一个文件
mFile = new File(mApkPath);
if (FileUtils.createFileByDeleteOldFile(mFile)) {
if (mApi == null) {
Log.e(TAG, "downloadApk: 下载接口为空了");
LogUtils.e(TAG, "downloadApk: 下载接口为空了");
return;
}
mCall = mApi.downloadFile(url);
@@ -284,7 +283,7 @@ public class DownloadUtil {
while ((len = is.read(buff)) != -1) {
os.write(buff, 0, len);
currentLength += len;
Log.e(TAG, "当前进度: " + currentLength);
LogUtils.e(TAG, "当前进度: " + currentLength);
long finalCurrentLength = currentLength;
HANDLER.post(new Runnable() {
@Override