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