fix: 修复反馈的闪退记录有机率不能上报到后台的问题

This commit is contained in:
juntao
2022-07-15 14:31:37 +08:00
parent b0f2d3f068
commit 1042ed675f
4 changed files with 22 additions and 97 deletions

View File

@ -227,10 +227,10 @@ public class MainActivity extends BaseActivity {
mPackageViewModel = ViewModelProviders.of(this, new PackageViewModel.Factory()).get(PackageViewModel.class);
final String message = com.gh.gamecenter.common.constant.Config.getExceptionMsg();
if (!TextUtils.isEmpty(message)) {
com.gh.gamecenter.common.constant.Config.setExceptionMsg(null);
DataUtils.reportException(this, new Throwable(message));
final boolean containsErrorMsg = com.gh.gamecenter.common.constant.Config.isContainsErrorMsg();
if (containsErrorMsg) {
com.gh.gamecenter.common.constant.Config.updateContainsErrorMsg(false);
DataUtils.reportException(this, new Throwable(com.gh.gamecenter.common.constant.Config.getExceptionMsg()));
// 被改过的包闪退时增加跳转到光环游戏详情并自动下载的方法
if (com.gh.gamecenter.common.constant.Config.DEFAULT_CHANNEL_FOR_RELEASE.equals(HaloApp.getInstance().getChannel())) {
DialogHelper.showCenterWarningDialog(this, "发生闪退", "光环助手发生了闪退,建议安装到最新版本修复异常"