From d51940152c3255663bb854c36d1e007147958470 Mon Sep 17 00:00:00 2001 From: tongchenfei Date: Wed, 9 Sep 2020 18:51:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=88=86=E6=8B=A5=E5=A0=B5=E7=AD=96?= =?UTF-8?q?=E7=95=A5=E4=B8=8A=E6=8A=A5=E9=9C=80=E6=B1=82=E8=8C=83=E5=9B=B4?= =?UTF-8?q?=EF=BC=8Clauncher=E4=B8=8D=E5=8A=A0=E6=AD=A4=E9=9C=80=E6=B1=82?= =?UTF-8?q?=EF=BC=8C=E7=8B=AC=E7=AB=8Bapp=E5=8A=A0=E6=AD=A4=E9=9C=80?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/module/share/StrategyShareProvider.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/StrategyShareProvider.kt b/modules/mogo-module-share/src/main/java/com/mogo/module/share/StrategyShareProvider.kt index b0e1973ec9..a09b3a53c0 100644 --- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/StrategyShareProvider.kt +++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/StrategyShareProvider.kt @@ -4,6 +4,7 @@ import android.content.Context import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.template.IProvider import com.alibaba.android.arouter.launcher.ARouter +import com.mogo.commons.debug.DebugConfig import com.mogo.module.share.constant.ACCIDENT_STRATEGY_SHARE_PUSH_TYPE import com.mogo.module.share.constant.S_TAG import com.mogo.module.share.strategyreceiver.AccidentStrategyReceiver @@ -26,10 +27,12 @@ class StrategyShareProvider : IProvider { blockStrategy = BlockStrategy(context, apis) // 注册事故 apis.getSocketManagerApi(context).registerOnMessageListener(ACCIDENT_STRATEGY_SHARE_PUSH_TYPE, AccidentStrategyReceiver(apis)) - apis.registerCenterApi.registerMogoLocationListener(MogoServicePaths.PATH_STRATEGY_SHARE){ + if(!DebugConfig.isLauncher()) { + apis.registerCenterApi.registerMogoLocationListener(MogoServicePaths.PATH_STRATEGY_SHARE) { // Logger.d(S_TAG,"定位发生变化,准备记录速度: ${it.speed}") - blockStrategy.recordSpeed(it.speed * 3.6F) + blockStrategy.recordSpeed(it.speed * 3.6F) + } } } } \ No newline at end of file