[dev_arch_opt_3.0]

[Change]
[
1、删除旧版本定位注册
]

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2023-01-28 18:40:32 +08:00
parent 0e7664615f
commit 981b876a76
14 changed files with 28 additions and 41 deletions

View File

@@ -28,11 +28,9 @@ import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
@@ -286,7 +284,7 @@ public class BusPassengerModel {
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 注销定位监听
CallerMapLocationListenerManager.INSTANCE.removeListener(TAG,false);
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
MogoAiCloudSocketManager.getInstance(mContext)
.unregisterLifecycleListener(10010);

View File

@@ -31,7 +31,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
import com.mogo.eagle.core.utilcode.util.ToastUtils;
@@ -331,7 +330,7 @@ public class BusOrderModel {
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 注销定位监听
CallerMapLocationListenerManager.INSTANCE.removeListener(TAG,false);
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
//自动驾驶路线规划接口
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);

View File

@@ -5,7 +5,6 @@ import android.content.Context
import com.mogo.eagle.core.data.BaseData
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.utilcode.util.NetworkUtils
import com.mogo.eagle.core.utilcode.util.SharedPrefs
import com.mogo.eagle.core.utilcode.util.ToastUtils
@@ -66,7 +65,7 @@ object OchCommonLoginModel : IMoGoChassisLocationGCJ02Listener {
mContext = null
iTaxiLoginCallback = null
// 注销到达起始站围栏监听
CallerMapLocationListenerManager.removeListener(TAG, false)
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
}
/**

View File

@@ -25,7 +25,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
@@ -248,7 +247,7 @@ public class SweeperOrderModel {
startOrStopOrderLoop(false);
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 注销定位监听
CallerMapLocationListenerManager.INSTANCE.removeListener(TAG,false);
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
//自动驾驶路线规划接口
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);

View File

@@ -33,7 +33,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.function.call.v2x.CallLimitingVelocityListenerManager;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
@@ -255,7 +254,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 注销定位监听
CallerMapLocationListenerManager.INSTANCE.removeListener(TAG,false);
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
MogoAiCloudSocketManager.getInstance(mContext)
.unregisterLifecycleListener(10010);

View File

@@ -34,7 +34,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
@@ -263,7 +262,7 @@ public class TaxiModel {
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 注销地图监听
CallerMapLocationListenerManager.INSTANCE.removeListener(TAG,false);
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener(OCHSocketMessageManager.msgMonitorType);

View File

@@ -7,12 +7,12 @@ import com.mogo.commons.constants.HostConst
import com.mogo.commons.utils.RetryWithDelay
import com.mogo.eagle.core.data.camera.CameraEntity
import com.mogo.eagle.core.data.camera.ReqLiveCarBean
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.function.biz.monitoring.net.ICameraListServices
import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MONITOR
import com.mogo.eagle.function.biz.monitoring.net.ICameraListServices
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
@@ -90,7 +90,7 @@ class CronTaskManager {
* 请求路口一定范围内的设备信息(包含:摄像头、灯)
*/
private fun requestDeviceList() {
CallerMapLocationListenerManager.getCurrentLocation()?.let { location ->
CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()?.let { location ->
disposable = MoGoRetrofitFactory.getInstance(HostConst.getEagleHost())
.create(ICameraListServices::class.java)
.getDeviceList(location.longitude, location.latitude, 500)
@@ -124,7 +124,7 @@ class CronTaskManager {
}
private fun requestCarCameraList() {
CallerMapLocationListenerManager.getCurrentLocation()?.let { location ->
CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()?.let { location ->
carDisposable = MoGoRetrofitFactory.getInstance(HostConst.getEagleHost())
.create(ICameraListServices::class.java)
.getCarCameraList(ReqLiveCarBean(location.longitude, location.latitude))

View File

@@ -16,16 +16,15 @@ import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.api.vip.IMoGoVipSetListener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import com.mogo.eagle.core.utilcode.util.LocationUtils
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
import com.zhjt.service_biz.BizConfig
import mogo.telematics.pad.MessagePad
import kotlin.math.abs
@@ -275,7 +274,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
fun onDestroy() {
CallVipSetListenerManager.removeListener(TAG)
CallerTrafficLightListenerManager.removeListener(TAG)
CallerMapLocationListenerManager.removeListener(TAG, false)
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
}
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) {

View File

@@ -21,17 +21,17 @@ import com.mogo.eagle.core.data.trafficlight.isRed
import com.mogo.eagle.core.data.v2x.VipMessage
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
import com.mogo.eagle.function.biz.v2x.vip.network.VipNetWorkModel
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
import com.mogo.eagle.function.biz.v2x.vip.network.VipNetWorkModel
import com.zhjt.service_biz.BizConfig
class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListener,
@@ -195,9 +195,9 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
fun turnLight(controlTime: Int) {
if (result == null || mContext == null) return
val mogoLocation = CallerMapLocationListenerManager.getCurrentLocation()
val mogoLocation = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
if (mogoLocation != null) {
val bearing = mogoLocation.bearing.toDouble()
val bearing = mogoLocation.heading
CallerLogger.d("$M_V2X$TAG", "-- turnLight -- ")
MogoTrafficLightManager.INSTANCE.turnLightToGreen(
result!!.lightId, result!!.crossId, bearing, controlTime,

View File

@@ -15,7 +15,7 @@ import com.mogo.eagle.core.function.api.chat.biz.IMCallType.CALL_TYPE_DEFAULT
import com.mogo.eagle.core.function.api.chat.biz.IMCallType.CALL_TYPE_VEHICLE_TEAM
import com.mogo.eagle.core.function.api.chat.biz.IMCallType.CALL_TYPE_VOICE
import com.mogo.eagle.core.function.api.chat.biz.IMType.*
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.chat.facade.analytics.ChatAnalyticsFacade
import com.mogo.eagle.core.function.chat.facade.audio.AudioFocusFacade
import com.mogo.eagle.core.function.chat.facade.bridge.BridgeApi
@@ -581,7 +581,7 @@ object MoGoChatFacade: IMoGoChatFacade {
}
//告之服务器给发送方下发接收通话消息
try {
val location = CallerMapLocationListenerManager.getCurrentLocation()
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
val response = serverApi.requestConnectStatus(ConnectStatusParam(MoGoAiCloudClientConfig.getInstance().sn, sn, roomId, PUSH_MSG_AGREE_ENTER, CALL_TYPE_VOICE.type).also {
it.nickName = mySelf.get().name
it.headImgUrl = mySelf.get().icon
@@ -812,7 +812,7 @@ object MoGoChatFacade: IMoGoChatFacade {
}
val response = serverApi.inviteJoinVehicleTeam(CallRequestParam().also {
val user = mySelf.get()
val location = CallerMapLocationListenerManager.getCurrentLocation()
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
it.snSender = mySn
it.snReceiver = sn
it.nickName = user.name
@@ -958,7 +958,7 @@ object MoGoChatFacade: IMoGoChatFacade {
}
//告之服务器给发送方下发接收通话消息
try {
val location = CallerMapLocationListenerManager.getCurrentLocation()
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
val response = serverApi.requestConnectStatus(ConnectStatusParam(MoGoAiCloudClientConfig.getInstance().sn, sn, roomId, PUSH_MSG_AGREE_ENTER, CALL_TYPE_VEHICLE_TEAM.type).also {
it.nickName = mySelf.get().name
it.headImgUrl = mySelf.get().icon

View File

@@ -8,9 +8,7 @@ import com.mogo.eagle.core.data.BaseResponse
import com.mogo.eagle.core.data.chat.UserInfo
import com.mogo.eagle.core.function.api.chat.biz.ChatConsts
import com.mogo.eagle.core.function.api.chat.biz.IMCallType.CALL_TYPE_VOICE
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.chat.facade.consts.ChatHttp
import com.mogo.eagle.core.function.chat.facade.consts.ChatHttp.Companion.getConfig
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.chat.facade.net.bean.*
import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
@@ -71,7 +69,7 @@ internal class ChatServiceModel {
val map = hashMapOf<String, String>()
val sn = MoGoAiCloudClientConfig.getInstance().sn
val location = CallerMapLocationListenerManager.getCurrentLocation()
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
if (location != null) {
params.lon = location.longitude
params.lat = location.latitude
@@ -105,7 +103,7 @@ internal class ChatServiceModel {
suspend fun requestRoomInfo(param: CallRequestParam): BaseResponse<RoomInfo> {
val map = hashMapOf<String, String>()
val location = CallerMapLocationListenerManager.getCurrentLocation()
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
if (location != null) {
param.lat = location.latitude
param.lon = location.longitude

View File

@@ -52,7 +52,6 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManage
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerHDMapManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.map.CallerSmpManager
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
@@ -190,8 +189,6 @@ internal class DebugSettingView @JvmOverloads constructor(
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
// 添加 ADAS车辆状态&定位 监听
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
// 添加 地图样式改变 监听
CallerMapLocationListenerManager.addListener(TAG, this, false)
// 添加 域控制器感知数据 监听
CallerAutopilotIdentifyListenerManager.addListener(TAG, this)
// 添加 规划路径相关回调 监听
@@ -234,7 +231,7 @@ internal class DebugSettingView @JvmOverloads constructor(
// 移除 ADAS车辆状态&定位 监听
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
// 移除 地图样式改变 监听
CallerMapLocationListenerManager.removeListener(TAG, false)
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
// 移除 域控制器感知数据 监听
CallerAutopilotIdentifyListenerManager.removeListener(TAG)
// 移除 规划路径相关回调 监听

View File

@@ -42,7 +42,8 @@ import com.mogo.eagle.core.function.v2x.events.alarm.V2XAlarmServer
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.context
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.*
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.BROADCAST_SCENE_EXTRA_KEY
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.BROADCAST_SCENE_HANDLER_ACTION
import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager
import com.mogo.eagle.core.function.v2x.events.observer.V2XOptimalRouteObserver
import com.mogo.eagle.core.function.v2x.events.receiver.SceneBroadcastReceiver

View File

@@ -19,7 +19,6 @@ import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
import com.mogo.eagle.core.function.api.v2x.OnClearAllMarker
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.OnRoadListener
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
@@ -232,7 +231,7 @@ object AiRoadMarker {
private fun onDestroy() {
CallerMapRoadListenerManager.unRegisterRoadListener(TAG)
CallMarkersClearManager.removeAllMarkersClearListener(TAG)
CallerMapLocationListenerManager.removeListener(TAG, true)
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
pool.shutdownNow()
removeLine()
}