[dev_arch_opt_3.0] 联调完成obu升级功能
This commit is contained in:
@@ -16,5 +16,8 @@ public class Config {
|
||||
public final static String downLoadObuPath = Environment.getExternalStorageDirectory().getAbsolutePath()
|
||||
+ "/obu/";
|
||||
|
||||
public final static String downLoadUnzipObuPath = Environment.getExternalStorageDirectory().getAbsolutePath()
|
||||
+ "/obuunzip/";
|
||||
|
||||
public final static String DOWN_LOAD_TAG = "Package-DownLoad";
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class DownloadThread extends Thread {
|
||||
int start = threadBean.getStart() + threadBean.getFinished();
|
||||
connection.setRequestProperty("Range","bytes="+start+"-"+threadBean.getEnd());
|
||||
//设置写入位置
|
||||
File file = new File(Config.downLoadPath,fileBean.getFileName());
|
||||
File file = new File(fileBean.getFileName().contains(".zip") ? Config.downLoadObuPath : Config.downLoadPath,fileBean.getFileName());
|
||||
raf = new RandomAccessFile(file,"rwd");
|
||||
raf.seek(start);
|
||||
//开始下载
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.utilcode.breakpoint.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.breakpoint.bean.FileBean;
|
||||
import com.mogo.eagle.core.utilcode.breakpoint.callback.IDownload;
|
||||
|
||||
Reference in New Issue
Block a user