[6.6.0][状态栏] refactor: 退出登录时关闭 FSM 异常弹框、状态栏总结弹框;
This commit is contained in:
@@ -4,10 +4,13 @@ import android.content.Context
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoFsm2024Listener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoNodeStateListener
|
||||
import com.mogo.eagle.core.function.api.order.IOrderListener
|
||||
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.autopilot.CallerFsm2024ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerNodeStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.order.CallerOrderListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
@@ -21,7 +24,7 @@ import kotlinx.coroutines.launch
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
internal class FSMImpl(ctx: Context) : IFlow<FSMStatus>(ctx), IMoGoAutopilotStatusListener,
|
||||
IMoGoFsm2024Listener, IMoGoNodeStateListener {
|
||||
IMoGoFsm2024Listener, IMoGoNodeStateListener, IOrderListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "FSMImpl"
|
||||
@@ -73,8 +76,8 @@ internal class FSMImpl(ctx: Context) : IFlow<FSMStatus>(ctx), IMoGoAutopilotStat
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerFsm2024ListenerManager.addListener(TAG, this)
|
||||
CallerNodeStateListenerManager.addNodeStateListener(TAG, setOf(AdasConstants.NodeName.FSM2024), this)
|
||||
CallerOrderListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onAutopilotIpcConnectStatusChanged(
|
||||
status: AdasConstants.IpcConnectionStatus,
|
||||
reason: String?
|
||||
@@ -124,11 +127,20 @@ internal class FSMImpl(ctx: Context) : IFlow<FSMStatus>(ctx), IMoGoAutopilotStat
|
||||
}
|
||||
}
|
||||
|
||||
override fun onLoginStatusUpdate(isLogin: Boolean) {
|
||||
super.onLoginStatusUpdate(isLogin)
|
||||
if (!isLogin) {
|
||||
CallerLogger.d(TAG, "onLoginStatusUpdate isLogin=$isLogin")
|
||||
CallerHmiManager.dismissFSMStatusDetailWindow()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
CallerLogger.d("$M_DEVA$TAG", "-- onDestroy --")
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerFsm2024ListenerManager.removeListener(TAG)
|
||||
CallerNodeStateListenerManager.removeNodeStateListener(TAG)
|
||||
CallerOrderListenerManager.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user