1.优化处理后台任务含视频有空地址的情况保持代码健壮性

2.优化处理apk下载完成不上报后台后减少EventBus通知
This commit is contained in:
2025-11-26 16:04:15 +08:00
parent ab21451616
commit 3311bda502

View File

@@ -123,7 +123,7 @@ public class ADManager implements DownLoadManeger.DownloadListener {
if(!TextUtils.isEmpty(dbLocalFilePath)) {
int lastIndex = dbLocalFilePath.lastIndexOf("/");
String fileName=lastIndex==-1?dbLocalFilePath:dbLocalFilePath.substring(lastIndex+1);
if(!aDInfo.getAdUri().contains(fileName)){
if(TextUtils.isEmpty(aDInfo.getAdUri())||!aDInfo.getAdUri().contains(fileName)){
File oldfile = new File(dbLocalFilePath);
List<AdsInfoBean> adSInfoBeanList =DaoManager.getInstance().queryByKeyList(AdsInfoBean.class,"localFilePath",dbLocalFilePath);
if (oldfile.exists()&& adSInfoBeanList.size()==1) {
@@ -410,7 +410,7 @@ public class ADManager implements DownLoadManeger.DownloadListener {
EventBusUtils.postMsg(new MessageEvent(MessageEvent.ACTION_UPADATE_DATA_SOURCE));
}
},1000*5);
EventBusUtils.postMsg(new MessageEvent(MessageEvent.ACTION_UPADATE_DATA_SOURCE));
// EventBusUtils.postMsg(new MessageEvent(MessageEvent.ACTION_UPADATE_DATA_SOURCE));
}else{
EventBusUtils.postMsg(new MessageEvent(MessageEvent.ACTION_UPADATE_DATA_SOURCE));
}