强更替换为appUpdate库。
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user