From 24ba0d4854c586a69514bf9a306e87dd6c78ff80 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Sun, 8 Oct 2023 15:05:59 +0800 Subject: [PATCH] =?UTF-8?q?[6.1.0]=20[charter-p]=20[=E5=90=90=E5=8F=B8?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E7=BA=BF=E7=A8=8B=E6=97=A0=E6=B3=95=E6=B5=8B?= =?UTF-8?q?=E9=87=8F=E9=97=AE=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/module/debug/DebugDataDispatch.kt | 4 ++- .../module/wigets/toast/ToastCharterUtils.kt | 32 ++++++++++++------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/OCH/mogo-och-common-module/src/debug/java/com/mogo/och/common/module/debug/DebugDataDispatch.kt b/OCH/mogo-och-common-module/src/debug/java/com/mogo/och/common/module/debug/DebugDataDispatch.kt index efef5d5a77..79752b7c4d 100644 --- a/OCH/mogo-och-common-module/src/debug/java/com/mogo/och/common/module/debug/DebugDataDispatch.kt +++ b/OCH/mogo-och-common-module/src/debug/java/com/mogo/och/common/module/debug/DebugDataDispatch.kt @@ -91,7 +91,9 @@ object DebugDataDispatch { newBuilder.timestampBuilder.nsec = 0 newBuilder.src = "2" newBuilder.level = "" - CallerAutoPilotStatusListenerManager.invokeAutopilotGuardian(newBuilder.build()) + ThreadUtils.getSinglePool().execute { + CallerAutoPilotStatusListenerManager.invokeAutopilotGuardian(newBuilder.build()) + } } carLightSwitch -> { //0-5 diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/toast/ToastCharterUtils.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/toast/ToastCharterUtils.kt index 932b1632f7..751d21222e 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/toast/ToastCharterUtils.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/toast/ToastCharterUtils.kt @@ -5,9 +5,13 @@ import android.view.View import androidx.annotation.StringRes import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.utilcode.util.ActivityUtils import com.mogo.eagle.core.utilcode.util.StringUtils import com.mogo.eagle.core.utilcode.util.ToastUtils +import com.mogo.eagle.core.utilcode.util.UiThreadHandler +import com.mogo.och.common.module.bean.dpmsg.BaseDPMsg import me.jessyan.autosize.utils.AutoSizeUtils object ToastCharterUtils { @@ -17,22 +21,28 @@ object ToastCharterUtils { @JvmStatic fun showToastLong(toastText: String){ - if (AppIdentityModeUtils.isCharterPassenger(FunctionBuildConfig.appIdentityMode)) { - showCharterLongToast(toastText) - }else{ - ToastUtils.showLong(toastText) - } + CallerLogger.d(SceneConstant.M_OCHCOMMON + TAG,"showToastLong吐司内容:${toastText}") + UiThreadHandler.post( { + if (AppIdentityModeUtils.isCharterPassenger(FunctionBuildConfig.appIdentityMode)) { + showCharterLongToast(toastText) + }else{ + ToastUtils.showLong(toastText) + } + }, UiThreadHandler.MODE.QUEUE) } @JvmStatic fun showToastShort(toastText: String?){ - toastText?.let { - if (AppIdentityModeUtils.isCharterPassenger(FunctionBuildConfig.appIdentityMode)) { - showCharterShortToast(toastText) - }else{ - ToastUtils.showShort(toastText) + CallerLogger.d(SceneConstant.M_OCHCOMMON + TAG,"showToastShort吐司内容:${toastText}") + UiThreadHandler.post( { + toastText?.let { + if (AppIdentityModeUtils.isCharterPassenger(FunctionBuildConfig.appIdentityMode)) { + showCharterShortToast(toastText) + }else{ + ToastUtils.showShort(toastText) + } } - } + }, UiThreadHandler.MODE.QUEUE) } @JvmStatic