1.apk 安装过程中重启apk未安装未删除安装包修改为继续安装并删除安装包
2.apk 安装过程中重启apk已安装未删除安装包修改为删除安装包 3.DownLoadManager撤回下载任务但文件丢失会产生-tmp 0 size大小文件bug,下载异常日志打印
This commit is contained in:
@@ -143,7 +143,9 @@ public class DownLoadManeger {
|
||||
TaskQueue.getInstance().add(new DownLoadTaskThread(downLoadTaskBean, observer));
|
||||
}
|
||||
}
|
||||
|
||||
if(!file.exists()&&downLoadTaskBean.getCurrentProgress()==0){
|
||||
LogUtils.loge("power down but downloadstaskbean table remain task");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -156,13 +158,6 @@ public class DownLoadManeger {
|
||||
if(file.exists()&&file.length()>0&&file.length()<=downLoadTaskBean.getTotal()){
|
||||
downLoadTaskBean.setCurrentProgress(file.length());
|
||||
DaoManager.getInstance().update(DownLoadTaskBean.class,downLoadTaskBean);
|
||||
}else if(!file.exists()){
|
||||
try {
|
||||
boolean createFileSuccess=file.createNewFile();
|
||||
LogUtils.loge("下载任务但文件丢失创建文件="+createFileSuccess);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}else if(downLoadTaskBean.getCurrentProgress()!=0&&!TextUtils.isEmpty(downLoadTaskBean.getUrl())&&!TextUtils.isEmpty(downLoadTaskBean.getFileName())&&!TextUtils.isEmpty(downLoadTaskBean.getPath())){
|
||||
File file = new File(downLoadTaskBean.getPath()+downLoadTaskBean.getFileName()+"-tmp");
|
||||
|
||||
Reference in New Issue
Block a user