From 52f71201572a8f061c531015b64c781b6116a98b Mon Sep 17 00:00:00 2001 From: chenjuntao Date: Wed, 20 Mar 2024 14:13:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8C=85=E8=A3=B9=E4=B8=BA=20APK=20?= =?UTF-8?q?=E5=86=99=E5=85=A5=E6=B8=A0=E9=81=93=E5=86=85=E5=AE=B9=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chenjuntao --- .../main/java/com/gh/ndownload/NDownloadBridge.kt | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/gh/ndownload/NDownloadBridge.kt b/app/src/main/java/com/gh/ndownload/NDownloadBridge.kt index 0111dce614..78334c742c 100644 --- a/app/src/main/java/com/gh/ndownload/NDownloadBridge.kt +++ b/app/src/main/java/com/gh/ndownload/NDownloadBridge.kt @@ -11,6 +11,7 @@ import com.gh.download.DownloadManager import com.gh.gamecenter.common.constant.Constants import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.core.AppExecutor +import com.gh.gamecenter.core.utils.SentryHelper import com.gh.gamecenter.core.utils.ToastUtils import com.halo.assistant.HaloApp import com.lg.download.DownloadError @@ -260,11 +261,15 @@ object NDownloadBridge : InnerDownloadListener, IErrorRetryHandler { // 为下载好的 mod 游戏添加 OAID,格式为 "o|oaid" if (downloadEntity.getMetaExtra(Constants.EXTRA_IS_MODDED_GAME) == "true") { - ChannelWriter.addChannelByV2( - File(downloadEntity.path), - "o|${HaloApp.getInstance().oaid}", - true - ) + try { + ChannelWriter.addChannelByV2( + File(downloadEntity.path), + "o|${HaloApp.getInstance().oaid}", + true + ) + } catch (e: Exception) { + SentryHelper.onEvent("ADD_CHANNEL_FAILED", "error_digest", e.localizedMessage) + } }