merge
This commit is contained in:
@@ -4,17 +4,17 @@ import chassis.VehicleStateOuterClass
|
||||
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
import com.mogo.eagle.core.data.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ARRIVE
|
||||
import com.mogo.eagle.core.data.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_GUARDIAN
|
||||
import com.mogo.eagle.core.data.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_RECORD
|
||||
import com.mogo.eagle.core.data.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ROUTE
|
||||
import com.mogo.eagle.core.data.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_STATUS
|
||||
import com.mogo.eagle.core.data.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_TRAJECTORY
|
||||
import com.mogo.eagle.core.data.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_WARN
|
||||
import com.mogo.eagle.core.data.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_STATE
|
||||
import com.mogo.eagle.core.data.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA
|
||||
import com.mogo.eagle.core.data.chain.ChainConstant.Companion.CHAIN_LINK_ADAS
|
||||
import com.mogo.eagle.core.data.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_DATA
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ARRIVE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_GUARDIAN
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_RECORD
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ROUTE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_STATUS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_TRAJECTORY
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_WARN
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_STATE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_ADAS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_DATA
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeArriveAtStation
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
package com.mogo.eagle.core.function.chat.facade.net
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.JsonElement
|
||||
import com.google.gson.JsonObject
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
import com.mogo.eagle.core.data.chat.UserInfo
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
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.chat.facade.bridge.BridgeApi
|
||||
@@ -18,8 +15,8 @@ import com.mogo.eagle.core.function.chat.facade.net.bean.*
|
||||
import com.mogo.eagle.core.function.chat.facade.utils.log
|
||||
import com.mogo.map.MogoLocationClient
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import retrofit2.http.*
|
||||
import java.lang.IllegalStateException
|
||||
|
||||
|
||||
internal class ChatServiceModel {
|
||||
@@ -35,11 +32,12 @@ internal class ChatServiceModel {
|
||||
} ?: false
|
||||
}
|
||||
|
||||
suspend fun queryUserInfo(sn: String): Pair<Error?,UserInfo?>? {
|
||||
suspend fun queryUserInfo(sn: String): Pair<Error?, UserInfo?>? {
|
||||
val sns = arrayListOf(sn)
|
||||
val requestData = SnArrayRequestBody().also { it.sns = sns }
|
||||
return apiCall {
|
||||
getNetWorkApi(getConfig())?.queryUserInfoBySnS(requestData) ?: throw IllegalStateException("apis is null.")
|
||||
getNetWorkApi(getConfig())?.queryUserInfoBySnS(requestData)
|
||||
?: throw IllegalStateException("apis is null.")
|
||||
}.let { itx ->
|
||||
if (itx.code != 0 && itx.code != 200) {
|
||||
return@let Pair(Error(itx.code, itx.msg), null)
|
||||
@@ -84,11 +82,13 @@ internal class ChatServiceModel {
|
||||
map["data"] = Gson().toJson(params)
|
||||
return if (params.type == CALL_TYPE_VOICE.type) {
|
||||
apiCall {
|
||||
getNetWorkApi()?.requestConnectStatus(sn, map) ?: throw IllegalStateException("apis is null.")
|
||||
getNetWorkApi()?.requestConnectStatus(sn, map)
|
||||
?: throw IllegalStateException("apis is null.")
|
||||
}
|
||||
} else {
|
||||
apiCall {
|
||||
getNetWorkApi()?.requestVehicleTeamConnectStatus(map) ?: throw IllegalStateException("apis is null.")
|
||||
getNetWorkApi()?.requestVehicleTeamConnectStatus(map)
|
||||
?: throw IllegalStateException("apis is null.")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,8 @@ internal class ChatServiceModel {
|
||||
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
map["data"] = Gson().toJson(param)
|
||||
return apiCall {
|
||||
getNetWorkApi()?.inviteJoinVehicleTeam(map) ?: throw IllegalStateException("apis is null.")
|
||||
getNetWorkApi()?.inviteJoinVehicleTeam(map)
|
||||
?: throw IllegalStateException("apis is null.")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,8 +123,7 @@ internal class ChatServiceModel {
|
||||
}
|
||||
|
||||
private fun getNetWorkApi(baseUrl: String = ChatHttp.getBaseUrl()): HttpApi? {
|
||||
val serviceApi: IMogoServiceApis? = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation() as? IMogoServiceApis
|
||||
return serviceApi?.networkApi?.createNoCallAdapter(HttpApi::class.java, baseUrl)
|
||||
return MoGoRetrofitFactory.getInstanceNoCallAdapter(baseUrl).create(HttpApi::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,10 @@ internal interface HttpApi {
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-chat-service/car/voiceRoom/no/operate/v1")
|
||||
suspend fun requestConnectStatus(@Query("sn") sn: String, @FieldMap connectStatus: Map<String, String>): BaseResponse<Any>
|
||||
suspend fun requestConnectStatus(
|
||||
@Query("sn") sn: String,
|
||||
@FieldMap connectStatus: Map<String, String>
|
||||
): BaseResponse<Any>
|
||||
|
||||
//邀请加入车队
|
||||
@FormUrlEncoded
|
||||
|
||||
@@ -4,12 +4,15 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneTAG
|
||||
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.BadCaseManager
|
||||
import com.zhjt.mogo_core_function_devatools.feedback.FeedbackManager
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchManager
|
||||
import com.zhjt.mogo_core_function_devatools.scene.SceneManager.Companion.sceneManager
|
||||
import com.zhjt.mogo_core_function_devatools.trace.TraceManager.Companion.traceManager
|
||||
import record_cache.RecordPanelOuterClass
|
||||
|
||||
@@ -49,6 +52,22 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
traceManager.refreshTraceInfo(map)
|
||||
}
|
||||
|
||||
override fun getModuleTAG(): MutableMap<String, SceneModule> {
|
||||
return sceneManager.getModuleLogTAG()
|
||||
}
|
||||
|
||||
override fun updateModuleTAG(moduleTag: MutableMap<String, SceneModule>) {
|
||||
sceneManager.updateModuleTAG(moduleTag)
|
||||
}
|
||||
|
||||
override fun getSceneLogTAG(): MutableMap<String, SceneTAG> {
|
||||
return sceneManager.getSceneLogTAG()
|
||||
}
|
||||
|
||||
override fun updateSceneTAG(sceneTag: MutableMap<String, SceneTAG>) {
|
||||
sceneManager.updateSceneTAG(sceneTag)
|
||||
}
|
||||
|
||||
override fun initBadCase(view: View, onShow: (() -> Unit)?, onHide: (() -> Unit)?) {
|
||||
BadCaseManager.init(view, onShow, onHide)
|
||||
}
|
||||
|
||||
@@ -1,17 +1,127 @@
|
||||
package com.zhjt.mogo_core_function_devatools.scene
|
||||
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneLogTAG
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModuleTAG
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneTAG
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.Scene.Companion.scene
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_NETWORK
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OLD_ROUTE
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_TAXI
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneLogCache
|
||||
|
||||
//todo 1. SceneLogCache增加模块名称,提供场景需要
|
||||
//todo 2. 对特定场景提供数据, 网约车,调度...
|
||||
|
||||
//1. SceneLogCache增加模块名称,提供场景需要
|
||||
//2. 对特定场景提供数据, 网约车,调度...
|
||||
class SceneManager {
|
||||
|
||||
companion object {
|
||||
|
||||
private const val ADAS = "ADAS"
|
||||
private const val DEVA = "DEVA"
|
||||
private const val HMI = "HMI"
|
||||
private const val OBU = "OBU"
|
||||
private const val V2X = "V2X"
|
||||
private const val ROUTE = "ROUTE"
|
||||
private const val NET = "NET"
|
||||
private const val BUS = "BUS"
|
||||
private const val TAXI = "TAXI"
|
||||
|
||||
val sceneManager: SceneManager by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
SceneManager()
|
||||
}
|
||||
}
|
||||
|
||||
fun init(){
|
||||
private var sceneCache: MutableMap<String, SceneLogCache> = scene.getSceneCache()
|
||||
private var sceneModuleTAG: SceneModuleTAG = SceneModuleTAG(mutableMapOf())
|
||||
private var sceneLogTAG: SceneLogTAG = SceneLogTAG(mutableMapOf())
|
||||
|
||||
fun init() {
|
||||
//过滤所需条件
|
||||
sceneModuleTAG.map[ADAS] = SceneModule(true, M_ADAS_IMPL)
|
||||
sceneModuleTAG.map[DEVA] = SceneModule(true, M_DEVA)
|
||||
sceneModuleTAG.map[HMI] = SceneModule(true, M_HMI)
|
||||
sceneModuleTAG.map[OBU] = SceneModule(false, M_OBU)
|
||||
sceneModuleTAG.map[V2X] = SceneModule(true, M_V2X)
|
||||
sceneModuleTAG.map[ROUTE] = SceneModule(true, M_OLD_ROUTE)
|
||||
sceneModuleTAG.map[NET] = SceneModule(true, M_NETWORK)
|
||||
sceneModuleTAG.map[BUS] = SceneModule(false, M_BUS)
|
||||
sceneModuleTAG.map[TAXI] = SceneModule(false, M_TAXI)
|
||||
|
||||
sceneLogTAG.map[TAXI] = SceneTAG(false)
|
||||
sceneLogTAG.map[BUS] = SceneTAG(false)
|
||||
}
|
||||
|
||||
fun getModuleLogTAG(): MutableMap<String, SceneModule> {
|
||||
return sceneModuleTAG.map
|
||||
}
|
||||
|
||||
fun getSceneLogTAG(): MutableMap<String, SceneTAG> {
|
||||
return sceneLogTAG.map
|
||||
}
|
||||
|
||||
fun updateModuleTAG(moduleTag: MutableMap<String, SceneModule>) {
|
||||
moduleTag.iterator().forEach { map ->
|
||||
val name = map.value.name
|
||||
val logger = map.value.log
|
||||
name?.let {
|
||||
val sceneLogCache = sceneCache[it]
|
||||
sceneLogCache?.let { logCache ->
|
||||
logCache.logger = logger
|
||||
sceneCache[it] = logCache
|
||||
}
|
||||
}
|
||||
}
|
||||
scene.updateSceneCache(sceneCache)
|
||||
}
|
||||
|
||||
fun updateSceneTAG(sceneTag: MutableMap<String, SceneTAG>) {
|
||||
sceneTag.iterator().forEach { map ->
|
||||
realUpdateSceneTAG(map.key, map.value.log)
|
||||
}
|
||||
updateSceneModuleTAG()
|
||||
}
|
||||
|
||||
private fun updateSceneModuleTAG() {
|
||||
sceneModuleTAG.map.iterator().forEach { map ->
|
||||
val sceneModule = map.value
|
||||
val sceneLogCache = sceneCache[sceneModule.name]
|
||||
sceneLogCache?.let {
|
||||
sceneModule.log = it.logger
|
||||
}
|
||||
map.setValue(sceneModule)
|
||||
}
|
||||
//call back
|
||||
CallerDevaToolsListenerManager.invokeDevaToolsModuleLogChanges(sceneModuleTAG.map)
|
||||
}
|
||||
|
||||
private fun realUpdateSceneTAG(name: String, logger: Boolean) {
|
||||
when (name) {
|
||||
TAXI -> {
|
||||
sceneCache[M_TAXI]?.logger = logger
|
||||
sceneCache[M_NETWORK]?.logger = logger
|
||||
sceneCache[M_ADAS_IMPL]?.logger = logger
|
||||
sceneCache[M_HMI]?.logger = logger
|
||||
sceneCache[M_DEVA]?.logger = logger
|
||||
sceneCache[M_OLD_ROUTE]?.logger = logger
|
||||
scene.updateSceneCache(sceneCache)
|
||||
}
|
||||
BUS -> {
|
||||
sceneCache[M_BUS]?.logger = logger
|
||||
sceneCache[M_NETWORK]?.logger = logger
|
||||
sceneCache[M_ADAS_IMPL]?.logger = logger
|
||||
sceneCache[M_HMI]?.logger = logger
|
||||
sceneCache[M_DEVA]?.logger = logger
|
||||
sceneCache[M_OLD_ROUTE]?.logger = logger
|
||||
scene.updateSceneCache(sceneCache)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@ package com.zhjt.mogo_core_function_devatools.trace
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.DeviceUtils
|
||||
|
||||
@@ -3,16 +3,8 @@ package com.mogo.eagle.core.function.hmi.receiver
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showBrakeLight
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showTurnLight
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
|
||||
/**
|
||||
* 转向灯,刹车
|
||||
@@ -37,8 +29,8 @@ class TurnLightBroadcastReceiver : BroadcastReceiver() {
|
||||
|
||||
|
||||
private fun showTurnLight( //type 1,转向灯,2刹车
|
||||
type: Int,
|
||||
lightInt: Int
|
||||
type: Int,
|
||||
lightInt: Int
|
||||
) {
|
||||
if (type == 1) {
|
||||
showTurnLight(lightInt) //设置转向灯
|
||||
|
||||
@@ -3,13 +3,10 @@ package com.mogo.eagle.core.function.hmi.receiver
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
|
||||
/**
|
||||
* V2X 预警广播接收。用于跨应用,跨进程,内部也可以通过这种方式 控制限速标志
|
||||
@@ -21,13 +18,10 @@ class V2XLimitingVelocityBroadcastReceiver : BroadcastReceiver() {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "V2XLimitingVelocityBroadcastReceiver"
|
||||
private var mMogoServiceApis: IMogoServiceApis? = null
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
try {
|
||||
mMogoServiceApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS)
|
||||
.navigation(context) as IMogoServiceApis
|
||||
mContext = context
|
||||
|
||||
val limitingVelocityIsShow =
|
||||
|
||||
@@ -3,11 +3,8 @@ package com.mogo.eagle.core.function.hmi.receiver
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
|
||||
/**
|
||||
* V2X 预警广播接收。用于跨应用,跨进程,内部也可以通过这种方式 触发红绿灯场景
|
||||
@@ -19,13 +16,10 @@ class V2XTrafficLightBroadcastReceiver : BroadcastReceiver() {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "V2XTrafficLightBroadcastReceiver"
|
||||
private var mMogoServiceApis: IMogoServiceApis? = null
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
try {
|
||||
mMogoServiceApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS)
|
||||
.navigation(context) as IMogoServiceApis
|
||||
mContext = context
|
||||
|
||||
val trafficLightIsShow =
|
||||
|
||||
@@ -95,7 +95,7 @@ class NoticeCheckDialog(context: Context) : BaseFloatDialog(context), LifecycleO
|
||||
}
|
||||
|
||||
mServiceApis = MogoApisHandler.getInstance().apis
|
||||
mServiceApis?.getStatusManagerApi()?.registerStatusChangedListener(TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForCheckNotice)
|
||||
mServiceApis?.statusManagerApi?.registerStatusChangedListener(TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForCheckNotice)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -11,9 +11,10 @@ import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.*
|
||||
import com.mogo.eagle.core.data.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.obu.ObuStatusInfo
|
||||
@@ -424,6 +425,10 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun moduleLogChanged(moduleTag: MutableMap<String, SceneModule>) {
|
||||
//todo 模块日志 tag 发生变化,需要更新对应 UI
|
||||
}
|
||||
})
|
||||
tbLogDebugView.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.utils
|
||||
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -12,15 +8,6 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
*
|
||||
* 描述
|
||||
*/
|
||||
private var apis: IMogoServiceApis? = null
|
||||
|
||||
fun getApis(context: Context): IMogoServiceApis {
|
||||
if (apis == null) {
|
||||
apis = ARouter.getInstance().build(com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_SERVICE_APIS).navigation(context) as IMogoServiceApis;
|
||||
}
|
||||
return apis!!
|
||||
}
|
||||
|
||||
fun View.gone() {
|
||||
if (this.visibility != View.GONE) {
|
||||
this.visibility = View.GONE
|
||||
|
||||
@@ -326,7 +326,7 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
// 云公告发布
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AI_NOTICE, "IMoGoNoticeProvider"));
|
||||
// 调度
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AI_DISPATCH, "IDispatchProvider"));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_AI_DISPATCH, "IDispatchProvider"));
|
||||
// V2X 模块
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_V2X_MODULE, "V2XProvider"));
|
||||
// 自动驾驶系统检测模块
|
||||
|
||||
@@ -8,7 +8,7 @@ import android.widget.ImageView
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
import com.mogo.eagle.core.function.v2x.R
|
||||
import com.mogo.module.common.glide.SkinAbleBitmapTarget
|
||||
import com.mogo.eagle.core.widget.glide.SkinAbleBitmapTarget
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.data.chain
|
||||
package com.mogo.eagle.core.data.deva.chain
|
||||
|
||||
class ChainConstant {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.data.chain
|
||||
package com.mogo.eagle.core.data.deva.chain
|
||||
|
||||
class ChainLogParam {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mogo.eagle.core.data.deva.scene
|
||||
|
||||
//为页面提供场景基础数支撑类
|
||||
data class SceneModuleTAG(var map: MutableMap<String, SceneModule>) {
|
||||
}
|
||||
|
||||
class SceneModule(var log: Boolean, var name: String?) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//为页面提供场景服务类
|
||||
data class SceneLogTAG(var map: MutableMap<String, SceneTAG>){
|
||||
|
||||
}
|
||||
|
||||
class SceneTAG(var log: Boolean) {
|
||||
|
||||
}
|
||||
@@ -2,7 +2,9 @@ package com.mogo.eagle.core.function.api.devatools
|
||||
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.data.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneTAG
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
import record_cache.RecordPanelOuterClass
|
||||
|
||||
@@ -11,16 +13,54 @@ import record_cache.RecordPanelOuterClass
|
||||
*/
|
||||
interface IDevaToolsProvider : IMoGoFunctionServerProvider {
|
||||
|
||||
/**
|
||||
* 开始抓取日志,默认10min
|
||||
*/
|
||||
fun startLogCatch()
|
||||
|
||||
/**
|
||||
* 开始抓取日志
|
||||
* duration : 抓取时间(分钟)
|
||||
*/
|
||||
fun startLogCatch(duration: Int)
|
||||
|
||||
/**
|
||||
* 停止i抓取日志
|
||||
*/
|
||||
fun stopLogCatch()
|
||||
|
||||
/**
|
||||
* 获取链路信息
|
||||
*/
|
||||
fun getTraceInfo(): HashMap<Int, ChainLogParam>
|
||||
|
||||
/**
|
||||
* 更新链路信息
|
||||
*/
|
||||
fun refreshTraceInfo(map: HashMap<Int, ChainLogParam>)
|
||||
|
||||
/**
|
||||
* 获取模块TAG
|
||||
* 注:只返回核心模块,按需添加
|
||||
*/
|
||||
fun getModuleTAG(): MutableMap<String, SceneModule>
|
||||
|
||||
/**
|
||||
* 更新模块TAG
|
||||
*/
|
||||
fun updateModuleTAG(moduleTag: MutableMap<String, SceneModule>)
|
||||
|
||||
/**
|
||||
* 获取场景TAG
|
||||
* 注:现阶段返回 网约车场景,包含 TAXI , BUS
|
||||
*/
|
||||
fun getSceneLogTAG(): MutableMap<String, SceneTAG>
|
||||
|
||||
/**
|
||||
* 更新场景TAG
|
||||
*/
|
||||
fun updateSceneTAG(sceneTag: MutableMap<String, SceneTAG>)
|
||||
|
||||
/**
|
||||
* 初始化BadCase入口
|
||||
* @param view: 展示入口
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.eagle.core.function.api.devatools
|
||||
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
|
||||
/**
|
||||
* 开发套件工具接口
|
||||
*/
|
||||
@@ -8,7 +10,7 @@ interface IMoGoDevaToolsListener {
|
||||
/**
|
||||
* 日志抓取关闭回调(日志抓取忘记关闭,默认设置时长计时返回)
|
||||
*/
|
||||
fun onLogCatchClose(){
|
||||
fun onLogCatchClose() {
|
||||
|
||||
}
|
||||
|
||||
@@ -16,5 +18,10 @@ interface IMoGoDevaToolsListener {
|
||||
* 日志抓取按行返回 lineLog
|
||||
* 注:莫要在此回调中打印日志,否则会造成日志循环记录
|
||||
*/
|
||||
fun onLogCatch(lineLog : String)
|
||||
fun onLogCatch(lineLog: String)
|
||||
|
||||
/**
|
||||
* 模块TAG更新回调
|
||||
*/
|
||||
fun moduleLogChanged(moduleTag: MutableMap<String, SceneModule>)
|
||||
}
|
||||
@@ -138,4 +138,18 @@ object CallerAutoPilotManager {
|
||||
fun isConnected(): Boolean {
|
||||
return providerApi?.isConnected() ?: false
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工控机基础配置信息
|
||||
*/
|
||||
fun getCarConfig(){
|
||||
providerApi?.getCarConfig()
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全局路径
|
||||
*/
|
||||
fun getGlobalPath(){
|
||||
providerApi?.getGlobalPath()
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.call.devatools
|
||||
|
||||
import androidx.annotation.Nullable
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
@@ -64,4 +65,11 @@ object CallerDevaToolsListenerManager {
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeDevaToolsModuleLogChanges(moduleTag: MutableMap<String, SceneModule>){
|
||||
M_DEVA_TOOLS_LISTENER.forEach {
|
||||
val listener = it.value
|
||||
listener.moduleLogChanged(moduleTag)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,9 @@ import android.content.Context
|
||||
import android.view.ContextMenu
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneTAG
|
||||
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import record_cache.RecordPanelOuterClass
|
||||
@@ -53,6 +55,35 @@ object CallerDevaToolsManager {
|
||||
return devaToolsProviderApi?.getTraceInfo() ?: HashMap()
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新模块TAG
|
||||
*/
|
||||
fun getModuleTAG(): MutableMap<String, SceneModule>? {
|
||||
return devaToolsProviderApi?.getModuleTAG()
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新模块TAG
|
||||
*/
|
||||
fun updateModuleTAG(moduleTag: MutableMap<String, SceneModule>) {
|
||||
devaToolsProviderApi?.updateModuleTAG(moduleTag)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取场景TAG
|
||||
* 注:现阶段返回 网约车场景,包含 TAXI , BUS
|
||||
*/
|
||||
fun getSceneLogTAG(): MutableMap<String, SceneTAG>? {
|
||||
return devaToolsProviderApi?.getSceneLogTAG()
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新场景TAG
|
||||
*/
|
||||
fun updateSceneTAG(sceneTag: MutableMap<String, SceneTAG>) {
|
||||
devaToolsProviderApi?.updateSceneTAG(sceneTag)
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化BadCase相关配置
|
||||
*/
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.devatools.scene
|
||||
|
||||
import android.util.ArrayMap
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_NETWORK
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OLD_ROUTE
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OTHER
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneLogCache
|
||||
import java.util.*
|
||||
|
||||
class Scene {
|
||||
|
||||
companion object {
|
||||
|
||||
private val sceneCache: MutableMap<String, SceneLogCache> =
|
||||
Collections.synchronizedMap(ArrayMap())
|
||||
|
||||
val scene: Scene by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
Scene()
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
//初始化网络
|
||||
val networkMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_NETWORK] = networkMap
|
||||
|
||||
//初始化ADAS
|
||||
val adasMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_ADAS_IMPL] = adasMap
|
||||
|
||||
//初始化deva
|
||||
val devaMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_DEVA] = devaMap
|
||||
|
||||
//初始化路径规划
|
||||
val routeMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_OLD_ROUTE] = routeMap
|
||||
|
||||
//初始化其他模块,方便定位索引
|
||||
val otherMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_OTHER] = otherMap
|
||||
}
|
||||
|
||||
fun check(tag: String): Boolean {
|
||||
return if (canLog()) {
|
||||
classifyLog(tag)
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
//前置收口
|
||||
private fun canLog(): Boolean {
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* log分类,现阶段通过控制模块等级来限制,后续有需要再细分至模块对应类层级
|
||||
*/
|
||||
private fun classifyLog(tag: String): Boolean {
|
||||
var moduleName: String? = null
|
||||
var businessName: String? = null
|
||||
if (tag.contains("_")) {
|
||||
val tagSplit = tag.split("_")
|
||||
moduleName = tagSplit[0]
|
||||
if (tagSplit.size > 1) {
|
||||
businessName = tagSplit[1]
|
||||
}
|
||||
}
|
||||
|
||||
if (moduleName.isNullOrEmpty()) {
|
||||
val otherLogCache = sceneCache[M_OTHER]
|
||||
otherLogCache!!.tagMap!![tag] = true
|
||||
return otherLogCache.logger
|
||||
}
|
||||
|
||||
if (businessName.isNullOrEmpty()) {
|
||||
return false
|
||||
}
|
||||
|
||||
//此处存在用户自定义方式,可根据过滤找到对应不符合标准的模块
|
||||
var logCache = sceneCache[moduleName]
|
||||
if (logCache == null) {
|
||||
logCache = SceneLogCache(mutableMapOf(), true)
|
||||
logCache.tagMap!![businessName] = true
|
||||
}
|
||||
sceneCache[moduleName] = logCache
|
||||
return logCache.logger
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.module.common.glide;
|
||||
package com.mogo.eagle.core.widget.glide;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@@ -2,10 +2,13 @@ package com.mogo.eagle.core.utilcode.mogo.logger.scene
|
||||
|
||||
import android.util.ArrayMap
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_NETWORK
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OTHER
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OLD_ROUTE
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OTHER
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_TAXI
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
@@ -27,24 +30,36 @@ class Scene {
|
||||
//初始化网络
|
||||
val networkMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_NETWORK] = networkMap
|
||||
|
||||
//初始化ADAS
|
||||
val adasMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_ADAS_IMPL] = adasMap
|
||||
|
||||
//初始化deva
|
||||
val devaMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_DEVA] = devaMap
|
||||
|
||||
//初始化hmi
|
||||
val hmiMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_HMI] = hmiMap
|
||||
//初始化路径规划
|
||||
val routeMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_OLD_ROUTE] = routeMap
|
||||
|
||||
//初始化其他模块,方便定位索引
|
||||
val otherMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_OTHER] = otherMap
|
||||
//初始化TAXI
|
||||
val taxiMap = SceneLogCache(mutableMapOf(), false)
|
||||
sceneCache[M_TAXI] = taxiMap
|
||||
//初始化BUS
|
||||
val busMap = SceneLogCache(mutableMapOf(), false)
|
||||
sceneCache[M_BUS] = busMap
|
||||
|
||||
}
|
||||
|
||||
fun getSceneCache(): MutableMap<String, SceneLogCache> {
|
||||
return sceneCache
|
||||
}
|
||||
|
||||
fun updateSceneCache(cache: MutableMap<String, SceneLogCache>) {
|
||||
sceneCache.putAll(cache)
|
||||
}
|
||||
|
||||
fun check(tag: String): Boolean {
|
||||
|
||||
@@ -26,5 +26,11 @@ class SceneConstant {
|
||||
const val M_OLD_ROUTE = "OLD-ROUTE-SERVICE_"
|
||||
const val M_OLD_OTHER = "OLD-OTHER-SERVICE_"
|
||||
const val M_OTHER = "ALL_OLD-MODULES_"
|
||||
|
||||
//小巴车
|
||||
const val M_BUS = "M_BUS_"
|
||||
//出租车
|
||||
const val M_TAXI = "M_TAXI_"
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,9 @@
|
||||
package com.mogo.eagle.core.utilcode.mogo.logger.scene
|
||||
|
||||
class SceneLogCache {
|
||||
|
||||
var tagMap:MutableMap<String,Boolean>? = null
|
||||
var logger:Boolean = true
|
||||
|
||||
constructor(tagMap: MutableMap<String, Boolean>?, logger: Boolean) {
|
||||
this.tagMap = tagMap
|
||||
this.logger = logger
|
||||
}
|
||||
|
||||
data class SceneLogCache(
|
||||
var tagMap: MutableMap<String, Boolean>?,
|
||||
var logger: Boolean
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,5 @@
|
||||
|
||||
#-----CommonModule-----
|
||||
-keep class com.mogo.module.common.entity.** {*;}
|
||||
-keep class com.mogo.module.common.map.Interrupter
|
||||
-keep class com.mogo.module.common.map.Scene
|
||||
-keep class com.mogo.module.common.wm.** {*;}
|
||||
-keep class com.mogo.module.common.MogoModulePaths
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
package com.mogo.module.common;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-03
|
||||
* <p>
|
||||
* 模块类型
|
||||
*/
|
||||
public interface ModuleType {
|
||||
|
||||
/**
|
||||
* 卡片类型 - fragment
|
||||
*/
|
||||
int TYPE_CARD_FRAGMENT = 1;
|
||||
|
||||
/**
|
||||
* 卡片类型 - view
|
||||
*/
|
||||
@Deprecated
|
||||
int TYPE_CARD_VIEW = 2;
|
||||
|
||||
/**
|
||||
* 服务类型的模块
|
||||
*/
|
||||
int TYPE_SERVICE = 3;
|
||||
|
||||
/**
|
||||
* APP 列表模块
|
||||
*/
|
||||
@Deprecated
|
||||
int TYPE_APP_LIST = 4;
|
||||
|
||||
/**
|
||||
* 小智语音形象
|
||||
*/
|
||||
@Deprecated
|
||||
int TYPE_VOICE = 5;
|
||||
|
||||
/**
|
||||
* 地图模块
|
||||
*/
|
||||
@Deprecated
|
||||
int TYPE_MAP = 6;
|
||||
|
||||
/**
|
||||
* 导航模块
|
||||
*/
|
||||
@Deprecated
|
||||
int TYPE_NAVI = 7;
|
||||
|
||||
/**
|
||||
* 小智、天气、时间等
|
||||
*/
|
||||
@Deprecated
|
||||
int TYPE_EXTENSION = 8;
|
||||
|
||||
/**
|
||||
* 操作快捷入口
|
||||
*/
|
||||
@Deprecated
|
||||
int TYPE_ENTRANCE = 9;
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package com.mogo.module.common.api;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerOnlineCar;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/9/24
|
||||
*
|
||||
* 车聊聊接口
|
||||
*/
|
||||
class CallChatApi {
|
||||
|
||||
private static final String TAG = "CallChatApi";
|
||||
|
||||
private static volatile CallChatApi sInstance;
|
||||
|
||||
private CallChatApi() {
|
||||
//mApiProvider = ARouter.getInstance().navigation( ICarsChattingProvider.class );
|
||||
}
|
||||
|
||||
public static CallChatApi getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( CallChatApi.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new CallChatApi();
|
||||
}
|
||||
}
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public synchronized void release() {
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
private Object readResolve() {
|
||||
// 阻止反序列化,必须实现 Serializable 接口
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public void showUserWindow( Context context, MarkerOnlineCar onlineCar ) throws Exception {
|
||||
// if ( mApiProvider == null ) {
|
||||
// return;
|
||||
// }
|
||||
// MogoDriverInfo driverInfo = new MogoDriverInfo();
|
||||
// driverInfo.setAge( onlineCar.getUserInfo().getAgeNumber() );
|
||||
// driverInfo.setCarTypeName( onlineCar.getCarInfo().getCarTypeName() );
|
||||
// driverInfo.setGender( onlineCar.getUserInfo().getGender() );
|
||||
// driverInfo.setLat( onlineCar.getLocation().getLat() );
|
||||
// driverInfo.setLon( onlineCar.getLocation().getLon() );
|
||||
// driverInfo.setLocationInfo( onlineCar.getLocation().getAddress() );
|
||||
// driverInfo.setSn( onlineCar.getUserInfo().getSn() );
|
||||
// driverInfo.setUserHead( onlineCar.getUserInfo().getUserHead() );
|
||||
// driverInfo.setUserName( onlineCar.getUserInfo().getUserName() );
|
||||
// if ( mApiProvider != null ) {
|
||||
// mApiProvider.showUserWindow( TAG, driverInfo, context );
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.mogo.module.common.map;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-10
|
||||
* <p>
|
||||
* 拦截器
|
||||
*/
|
||||
public interface Interrupter {
|
||||
|
||||
/**
|
||||
* 是否拦截
|
||||
* @return true - 拦截, false - 不拦截
|
||||
*/
|
||||
boolean interrupt();
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.mogo.module.common.map;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-10
|
||||
* <p>
|
||||
* 地图视图中心点
|
||||
*/
|
||||
public class MapCenterPoint {
|
||||
|
||||
public final double x;
|
||||
public final double y;
|
||||
|
||||
public MapCenterPoint( double x, double y ) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.mogo.module.common.map;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-10
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public interface Scene {
|
||||
|
||||
/**
|
||||
* 普通场景
|
||||
*/
|
||||
int COMMON = 0;
|
||||
|
||||
/**
|
||||
* 选点
|
||||
*/
|
||||
int CHOOSE_POINT = 1;
|
||||
|
||||
/**
|
||||
* 导航
|
||||
*/
|
||||
int NAVI = 2;
|
||||
|
||||
/**
|
||||
* 导航 vs 道路事件
|
||||
*/
|
||||
int NAVI_WITH_ROAD_EVENT = 21;
|
||||
|
||||
/**
|
||||
* 巡航
|
||||
*/
|
||||
int AIMLESS = 3;
|
||||
|
||||
/**
|
||||
* 巡航 vs 道路事件
|
||||
*/
|
||||
int AIMLESS_WITH_ROAD_EVENT = 31;
|
||||
|
||||
/**
|
||||
* 路线规划
|
||||
*/
|
||||
int CALCULATE_PATH = 4;
|
||||
|
||||
/**
|
||||
* 分类搜索
|
||||
*/
|
||||
int CATEGORY_SEARCH = 5;
|
||||
|
||||
/**
|
||||
* V2X触发了预警场景
|
||||
*/
|
||||
int CATEGORY_V2X_EVENT = 6;
|
||||
}
|
||||
@@ -19,7 +19,6 @@ import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.marker.IMogoMarkerManager;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.module.common.ModuleNames;
|
||||
import com.mogo.module.common.api.CallChatApi;
|
||||
import com.mogo.module.common.drawer.MarkerDrawer;
|
||||
import com.mogo.module.common.drawer.RoadConditionDrawer;
|
||||
import com.mogo.module.common.drawer.marker.IMarkerView;
|
||||
@@ -254,7 +253,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
}
|
||||
marker.setIcon(OnlineCarMarkerView.getInstance().getSelectedBitmap(getCarVehicleType(marker)));
|
||||
MarkerOnlineCar onlineCar = (MarkerOnlineCar) ((MarkerShowEntity) marker.getObject()).getBindObj();
|
||||
CallChatApi.getInstance().showUserWindow(mContext, onlineCar);
|
||||
//车聊聊显示用户信息界面
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user