From f8d372207e91540708d233ca4e3d4d56d5029845 Mon Sep 17 00:00:00 2001 From: chenjuntao Date: Wed, 19 Oct 2022 14:07:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8D=95=E6=8A=93=E5=AE=9E=E5=90=8D?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=20ContentProvider=20=E9=97=AA=E9=80=80?= =?UTF-8?q?=E5=B9=B6=E4=B8=8A=E6=8A=A5=E8=87=B3=20Sentry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/gh/common/util/DataUtils.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/gh/common/util/DataUtils.java b/app/src/main/java/com/gh/common/util/DataUtils.java index 608ac7c3c1..dccdb9b3d1 100644 --- a/app/src/main/java/com/gh/common/util/DataUtils.java +++ b/app/src/main/java/com/gh/common/util/DataUtils.java @@ -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(); + } } }); }