修改游戏详情退出奔溃bug

This commit is contained in:
huangzhuanghua
2016-06-30 17:01:12 +08:00
parent 1210911a3a
commit 35a915dda1

View File

@ -1151,34 +1151,36 @@ public class GameDetailsActivity extends BaseFragmentActivity implements
cost = "大于60秒";
}
Map<String, Object> kv = new HashMap<String, Object>();
kv.put("停留时长", cost);
DataUtils.onEvent(this, "插件数据", entity.getName(), kv);
if (entity != null && !TextUtils.isEmpty(entity.getName())) {
Map<String, Object> kv = new HashMap<String, Object>();
kv.put("停留时长", cost);
DataUtils.onEvent(this, "插件数据", entity.getName(), kv);
if ("主页-最新插件".equals(entrance)) {
Map<String, Object> kv2 = new HashMap<String, Object>();
kv2.put(entity.getName(), "阅读时长:" + cost);
DataUtils.onEvent(this, "主页数据", "最新插件", kv2);
} else if ("主页-热门卡牌".equals(entrance)) {
Map<String, Object> kv2 = new HashMap<String, Object>();
kv2.put(entity.getName(), "阅读时长:" + cost);
DataUtils.onEvent(this, "主页数据", "热门卡牌", kv2);
} else if ("主页-新测卡牌".equals(entrance)) {
Map<String, Object> kv2 = new HashMap<String, Object>();
kv2.put(entity.getName(), "阅读时长:" + cost);
DataUtils.onEvent(this, "主页数据", "新测卡牌", kv2);
if ("主页-最新插件".equals(entrance)) {
Map<String, Object> kv2 = new HashMap<String, Object>();
kv2.put(entity.getName(), "阅读时长:" + cost);
DataUtils.onEvent(this, "主页数据", "最新插件", kv2);
} else if ("主页-热门卡牌".equals(entrance)) {
Map<String, Object> kv2 = new HashMap<String, Object>();
kv2.put(entity.getName(), "阅读时长:" + cost);
DataUtils.onEvent(this, "主页数据", "热门卡牌", kv2);
} else if ("主页-新测卡牌".equals(entrance)) {
Map<String, Object> kv2 = new HashMap<String, Object>();
kv2.put(entity.getName(), "阅读时长:" + cost);
DataUtils.onEvent(this, "主页数据", "新测卡牌", kv2);
}
if (seconds > 0) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("game", entity.getName());
map.put("time", seconds);
map.put("from", entrance);
map.put("createdOn", System.currentTimeMillis() / 1000);
DataCollectionManager.onEvent(this, "game", map);
}
isSentReport = true;
}
if (seconds > 0) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("game", entity.getName());
map.put("time", seconds);
map.put("from", entrance);
map.put("createdOn", System.currentTimeMillis() / 1000);
DataCollectionManager.onEvent(this, "game", map);
}
isSentReport = true;
}
}