fix: 捕抓实名认证 ContentProvider 闪退并上报至 Sentry

This commit is contained in:
chenjuntao
2022-10-19 14:07:17 +08:00
parent 596b5603cf
commit f8d372207e

View File

@ -23,6 +23,7 @@ import com.gh.gamecenter.core.AppExecutor;
import com.gh.gamecenter.core.utils.GsonUtils;
import com.gh.gamecenter.core.utils.MtaHelper;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.core.utils.SentryHelper;
import com.gh.gamecenter.login.entity.IdCardEntity;
import com.gh.gamecenter.login.entity.UserInfoEntity;
import com.gh.gamecenter.provider.GhContentProvider;
@ -163,7 +164,14 @@ public class DataUtils {
}
// new GhContentProvider().localInsert( HaloApp.getInstance().getApplication(),values);
HaloApp.getInstance().getContentResolver().insert(Uri.parse("content://com.gh.gamecenter.provider/certification"), values);
try {
// Unknown URL content://com.gh.gamecenter.provider/certification
// TODO 将 com.gh.gamecenter 改成 BuildConfig.ApplicationID
HaloApp.getInstance().getContentResolver().insert(Uri.parse("content://com.gh.gamecenter.provider/certification"), values);
} catch (Exception exception) {
SentryHelper.INSTANCE.onEvent("CERTIFICATION_INSERT_ERROR", "exception_digest", exception.getLocalizedMessage());
exception.printStackTrace();
}
}
});
}