1.AppManager和SplashView处理图片断电重启无论多少次图片不显示而其原因为文件变回-tmp情况,广告位5s后刷新
2.DownLoadManeger 处理下载apk安装未完成重启无论多少次不安装情况 3.重命名系统概率不成功把重命名和删除文件操作分开间隔5s
This commit is contained in:
@@ -48,9 +48,9 @@ public class SystemService extends Service implements AppnetCallback, NetStateCh
|
||||
private static final int WHAT_PERIODIC_REQUEST = 4;
|
||||
|
||||
// 请求间隔(8小时,正式环境)
|
||||
// private static final long REQUEST_INTERVAL = 8 * 60 * 60 * 1000;
|
||||
private static final long REQUEST_INTERVAL = 8 * 60 * 60 * 1000;
|
||||
// 测试用短间隔
|
||||
private static final long REQUEST_INTERVAL = 5 * 60 * 1000; // 5分钟
|
||||
// private static final long REQUEST_INTERVAL = 5 * 60 * 1000; // 5分钟
|
||||
//持久化存储成功请求时间
|
||||
private static final String KEY_LAST_SUCCESS_TIME = "last_success_time";
|
||||
private boolean isFirstRequestDone = false; // 首次请求是否完成(重启后重置为false)
|
||||
|
||||
@@ -184,7 +184,7 @@ public class HomeMultiView extends MultiView {
|
||||
@Override
|
||||
public void onImageRestartLocal(String path){
|
||||
LogUtils.loge("onImageRestartLocal==>"+path);
|
||||
if(path==null){
|
||||
if(TextUtils.isEmpty(path)){
|
||||
return;
|
||||
}
|
||||
img_view.setVisibility(VISIBLE);
|
||||
|
||||
@@ -158,9 +158,16 @@ public class SplashView {
|
||||
}
|
||||
File file = new File(adsInfoBeanInfo.getLocalFilePath());
|
||||
if(!file.exists()){
|
||||
LogUtils.loge("file is not exits===>");
|
||||
mHandler.sendEmptyMessageDelayed(2,10000);
|
||||
return ;
|
||||
File tempFile=new File(adsInfoBeanInfo.getLocalFilePath()+"-tmp");
|
||||
if(tempFile.exists()&&tempFile.length()==adsInfoBeanInfo.getAdSize()){
|
||||
tempFile.renameTo(file);
|
||||
tempFile.delete();
|
||||
LogUtils.loge("下载大小完成但重命名失败同时下载任务已清除图片至始至终未显示优化处理 system rename file file bug compose");
|
||||
}else {
|
||||
LogUtils.loge("file is not exits===>");
|
||||
mHandler.sendEmptyMessageDelayed(2,10000);
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user