1.同一个广告位交替更换图片有概率产生图片已下载完成但下载任务表未删的情况
This commit is contained in:
@@ -142,6 +142,11 @@ public class DownLoadManeger {
|
|||||||
TaskQueue.getInstance().remove(downLoadTaskBean);
|
TaskQueue.getInstance().remove(downLoadTaskBean);
|
||||||
TaskQueue.getInstance().add(new DownLoadTaskThread(downLoadTaskBean, observer));
|
TaskQueue.getInstance().add(new DownLoadTaskThread(downLoadTaskBean, observer));
|
||||||
}
|
}
|
||||||
|
}else if(downLoadTaskBean.getTaskType()==0){//图片文件下载完成 删除downloadtaskbean表数据脏数据
|
||||||
|
File imgFile = new File(downLoadTaskBean.getPath()+downLoadTaskBean.getFileName());
|
||||||
|
if(imgFile.exists()&&imgFile.length()==downLoadTaskBean.getTotal()){
|
||||||
|
DaoManager.getInstance().delete(DownLoadTaskBean.class,downLoadTaskBean);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(!file.exists()&&downLoadTaskBean.getCurrentProgress()==0){
|
if(!file.exists()&&downLoadTaskBean.getCurrentProgress()==0){
|
||||||
LogUtils.loge("power down but downloadstaskbean table remain task");
|
LogUtils.loge("power down but downloadstaskbean table remain task");
|
||||||
|
|||||||
Reference in New Issue
Block a user