[8.0.0]
[fix] [关闭开关、推出登录后关闭算路模块]
This commit is contained in:
@@ -8,6 +8,7 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS
|
||||
@@ -521,6 +522,8 @@ object OrderModel {
|
||||
OchChainLogManager.writeChainLog("错误","${e.message}")
|
||||
}
|
||||
MogoStatusManager.getInstance().setShuttleDriverPerformTask(TAG, false)
|
||||
MogoStatusManager.getInstance().setTaxiUnmanedDriverLineRoutingVerifyMode(TAG, false)
|
||||
CallerSopSettingManager.invokeRoutingListener(false)
|
||||
MapMakerManager.removeAllMapMarkerByOwner(TAG)
|
||||
BusTrajectoryManager.stopTrajReqLoop()
|
||||
LoginStatusManager.loginOut()
|
||||
|
||||
@@ -3,9 +3,11 @@ package com.mogo.och.weaknet.ui.modeswitch
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import com.mogo.och.common.module.biz.routing.RoutingManager
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import com.mogo.och.common.module.wigets.WindowRelativeLayout
|
||||
import com.mogo.och.shuttle.weaknet.R
|
||||
import kotlinx.android.synthetic.main.shuttle_weak_biz.view.routingSwitchView
|
||||
@@ -55,7 +57,14 @@ class TopSwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCall
|
||||
switchOchBiz.visibility = GONE
|
||||
routingSwitchView.visibility = VISIBLE
|
||||
RoutingManager.getRoutingView()?.let {
|
||||
routingSwitchView.addView(it)
|
||||
try {
|
||||
if (it.parent!=null) {
|
||||
(it.parent as ViewGroup).removeAllViews()
|
||||
}
|
||||
routingSwitchView.addView(it)
|
||||
}catch (e:Exception){
|
||||
OchChainLogManager.writeChainLogError("添加routingview错误:TopSwitchBizView",e.message?:"")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,9 +3,11 @@ package com.mogo.och.unmanned.taxi.ui.bizswitch
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import com.mogo.och.common.module.biz.routing.RoutingManager
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import com.mogo.och.common.module.wigets.WindowRelativeLayout
|
||||
import com.mogo.och.unmanned.taxi.R
|
||||
import kotlinx.android.synthetic.main.unmanned_switch_biz.view.itinerarySwitchView
|
||||
@@ -55,7 +57,14 @@ class SwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCallbac
|
||||
itinerarySwitchView.visibility = GONE
|
||||
routingSwitchView.visibility = VISIBLE
|
||||
RoutingManager.getRoutingView()?.let {
|
||||
routingSwitchView.addView(it)
|
||||
try {
|
||||
if (it.parent!=null) {
|
||||
(it.parent as ViewGroup).removeAllViews()
|
||||
}
|
||||
routingSwitchView.addView(it)
|
||||
}catch (e:Exception){
|
||||
OchChainLogManager.writeChainLogError("添加routingview错误:SwitchBizView",e.message?:"")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
import com.mogo.eagle.core.function.call.och.CallerEagleBaseFunctionCall4OchManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager
|
||||
import com.mogo.eagle.core.function.call.unmanned.CallerUnmannedListenerManager
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -1407,6 +1408,7 @@ object TaxiTaskModel {
|
||||
MogoStatusManager.getInstance().setTaxiUnmanedDriverTakingOrders(TAG, false)
|
||||
MogoStatusManager.getInstance().setTaxiUnmanedDriverLineRoutingPerformTask(TAG, false)
|
||||
MogoStatusManager.getInstance().setTaxiUnmanedDriverLineRoutingVerifyMode(TAG, false)
|
||||
CallerSopSettingManager.invokeRoutingListener(false)
|
||||
}
|
||||
|
||||
//导航去订单终点目的地
|
||||
|
||||
@@ -668,7 +668,7 @@ class OperatePanelLayout : LinearLayout {
|
||||
}
|
||||
}
|
||||
|
||||
class BusinessPreferenceFragmentCompat : OperatePanelDetailBase(), IReceivedMsgListener {
|
||||
class BusinessPreferenceFragmentCompat : OperatePanelDetailBase(), IReceivedMsgListener,ISopSettingListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "BusinessPreferenceFragmentCompat"
|
||||
@@ -688,6 +688,7 @@ class OperatePanelLayout : LinearLayout {
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
CallerTelematicListenerManager.addListener(TAG, this)
|
||||
CallerSopSettingManager.addListener(TAG,this)
|
||||
lifecycleScope.launchWhenResumed {
|
||||
val p = preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_DRIVE_SEAT_VIDEO_STREAM)?.also {
|
||||
CallerDevaToolsManager.driveSeatVideoProvider()?.requestVideoInfo({ data ->
|
||||
@@ -711,6 +712,11 @@ class OperatePanelLayout : LinearLayout {
|
||||
CallerTelematicListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onRoutingClickEvent(status: Boolean) {
|
||||
super.onRoutingClickEvent(status)
|
||||
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_SELF_ROUTING_VERIFY_MODE)?.also { changeValue(it, status) }
|
||||
}
|
||||
|
||||
override fun getDefaultVal(pref: Preference): Any? {
|
||||
when (pref.key) {
|
||||
KEY_FAULT_REPORT_TIP -> {
|
||||
|
||||
@@ -30,4 +30,9 @@ interface ISopSettingListener {
|
||||
*/
|
||||
fun onCarApertureClickEvent(status: Boolean){}
|
||||
|
||||
/**
|
||||
* 验证算路模式
|
||||
*/
|
||||
fun onRoutingClickEvent(status: Boolean){}
|
||||
|
||||
}
|
||||
@@ -55,4 +55,11 @@ object CallerSopSettingManager: CallerBase<ISopSettingListener>() {
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeRoutingListener(status: Boolean){
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onRoutingClickEvent(status)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user