处理下载网络异常导致的奔溃问题,和奔溃后进入助手下载状态显示错误问题

This commit is contained in:
huangzhuanghua
2016-09-23 18:14:20 +08:00
parent 39350b2cfb
commit 5e44460112
17 changed files with 327 additions and 201 deletions

View File

@ -989,6 +989,19 @@ public class DownloadDialog {
kv.put("状态", "下载开始");
DataUtils.onEvent(context, "游戏更新", gameName, kv);
Map<String, Object> map = new HashMap<>();
map.put("game", gameName);
map.put("game_id", gameId);
map.put("method", "更新");
map.put("platform", PlatformUtils.getInstance(context)
.getPlatformName(apkEntity.getPlatform()));
map.put("status", "开始");
map.put("location", mlocation);
map.put("entrance", entrance);
map.put("btn_status", "更新");
map.put("network", NetworkUtils.getConnectedType(context));
DataCollectionManager.onEvent(context, "download", map);
DownloadEntity downloadEntity = new DownloadEntity();
downloadEntity.setUrl(apkEntity.getUrl());
downloadEntity.setName(gameName);
@ -1000,6 +1013,8 @@ public class DownloadDialog {
downloadEntity.setPlatform(apkEntity.getPlatform());
downloadEntity.setPackageName(apkEntity.getPackageName());
downloadEntity.setUpdate(true);
downloadEntity.setEntrance(entrance);
downloadEntity.setLocation(mlocation);
DownloadManager.getInstance(context).add(downloadEntity);
}
@ -1057,7 +1072,8 @@ public class DownloadDialog {
.getPlatformName(apkEntity.getPlatform()));
map.put("status", "开始");
map.put("location", mlocation);
map.put("from", entrance);
map.put("entrance", entrance);
map.put("btn_status", "插件化");
map.put("network", NetworkUtils.getConnectedType(context));
DataCollectionManager.onEvent(context, "download", map);
@ -1146,7 +1162,8 @@ public class DownloadDialog {
.getPlatformName(apkEntity.getPlatform()));
map.put("status", "开始");
map.put("location", mlocation);
map.put("from", entrance);
map.put("entrance", entrance);
map.put("btn_status", "下载");
map.put("network", NetworkUtils.getConnectedType(context));
DataCollectionManager.onEvent(context, "download", map);
@ -1160,10 +1177,8 @@ public class DownloadDialog {
downloadEntity.setPlatform(apkEntity.getPlatform());
downloadEntity.setPackageName(apkEntity.getPackageName());
downloadEntity.setGameId(gameId);
HashMap<String, String> meta = new HashMap<>();
meta.put("entrance", entrance);
meta.put("location", mlocation);
downloadEntity.setMeta(meta);
downloadEntity.setEntrance(entrance);
downloadEntity.setLocation(mlocation);
DownloadManager.getInstance(context).add(downloadEntity);