Merge remote-tracking branch 'origin/dev_move_old_model' into dev_move_old_model

# Conflicts:
#	core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt
This commit is contained in:
donghongyu
2021-12-23 18:37:36 +08:00
48 changed files with 477 additions and 644 deletions

View File

@@ -38,7 +38,6 @@ com.mogo.eagle.core:network:${MOGO_CORE_SDK_VERSION}
```gradle
MOGO_COMMONS_VERSION = 2.0.66
tanluupload : "com.mogo.module:module-tanlu-upload:${MOGO_COMMONS_VERSION}",
// modules
moduleshare : "com.mogo.module:module-share:${MOGO_COMMONS_VERSION}",
mogocommons : "com.mogo.commons:mogo-commons:${MOGO_COMMONS_VERSION}",
@@ -70,8 +69,6 @@ modulesearch : "com.mogo.module:module-search:${MOGO_COMMONS_VER
modulepush : "com.mogo.module:module-push:${MOGO_COMMONS_VERSION}",
modulepushbase : "com.mogo.module:module-push-base:${MOGO_COMMONS_VERSION}",
modulepushnoop : "com.mogo.module:module-push-noop:${MOGO_COMMONS_VERSION}",
// OBU
moduleobu : "com.mogo.module:module-obu:${MOGO_COMMONS_VERSION}",
// 左侧面板
moduleleftpanel : "com.mogo.module:module-left-panel:${MOGO_COMMONS_VERSION}",
// 左侧面板空实现
@@ -82,7 +79,6 @@ mogobaseserviceapk : "com.mogo.base:services-apk:${MOGO_COMMONS_VERSIO
mogobasewebsocketsdk : "com.mogo.base:websocket-sdk:${MOGO_COMMONS_VERSION}",
mogowebsocket : "com.mogo.module.carchatting:module-carchatt-socket:${MOGO_COMMONS_VERSION}",
mogologlib : "com.mogo.module:module-loglib:${MOGO_COMMONS_VERSION}",
mogomonitor : "com.mogo.module:module-monitor:${MOGO_COMMONS_VERSION}",
mogomodulewidgets : "com.mogo.module:module-widgets:${MOGO_COMMONS_VERSION}",
kotlingradleplugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${MOGO_COMMONS_VERSION}",
skinsupport : "com.mogo.skin:skin-support:${MOGO_COMMONS_VERSION}",

View File

@@ -184,7 +184,6 @@ dependencies {
implementation 'com.volcengine:apm_insight:1.4.4.cn'
implementation 'com.volcengine:apm_insight_crash:1.4.2'
implementation rootProject.ext.dependencies.mogologlib
compileOnly rootProject.ext.dependencies.adasapi
compileOnly rootProject.ext.dependencies.adasconfigapi

View File

@@ -180,7 +180,6 @@ ext {
mogobasewebsocketsdk : "com.mogo.base:websocket-sdk:${MOGO_BASE_WEBSOCKET_SDK_VERSION}",
mogowebsocket : "com.mogo.module.carchatting:module-carchatt-socket:${WEBSOCKET_VERSION}",
mogologlib : "com.mogo.module:module-loglib:${LOGLIB_VERSION}",
mogomonitor : "com.mogo.module:module-monitor:${MOGO_MODULE_MONITOR_VERSION}",
mogomodulewidgets : "com.mogo.module:module-widgets:${MOGO_MODULE_WIDGETS_VERSION}",
kotlingradleplugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}",
skinsupport : "com.mogo.skin:skin-support:${MOGO_SKIN_SUPPORT_VERSION}",
@@ -223,6 +222,7 @@ ext {
//========================= 新架构的 Maven 版本管理 =========================
mogo_core_function_autopilot : "com.mogo.eagle.core.function.impl:autopilot:${MOGO_CORE_FUNCTION_AUTOPILOT_VERSION}",
mogo_core_function_check : "com.mogo.eagle.core.function.impl:check:${MOGO_CORE_FUNCTION_CHECK_VERSION}",
mogo_core_function_devatools : "com.mogo.eagle.core.function.impl:devatools:${MOGO_CORE_FUNCTION_CHECK_VERSION}",
mogo_core_function_hmi : "com.mogo.eagle.core.function.impl:hmi:${MOGO_CORE_FUNCTION_HMI_VERSION}",
mogo_core_function_map : "com.mogo.eagle.core.function.impl:map:${MOGO_CORE_FUNCTION_MAP_VERSION}",
mogo_core_function_main : "com.mogo.eagle.core.function.impl:main:${MOGO_CORE_FUNCTION_MAIN_VERSION}",

View File

@@ -17,6 +17,7 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
//ARouter apt
kapt {
useBuildCache = false
@@ -42,17 +43,29 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation rootProject.ext.dependencies.androidxappcompat
implementation rootProject.ext.dependencies.androidxconstraintlayout
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
implementation rootProject.ext.dependencies.coroutinescore
implementation rootProject.ext.dependencies.arouter
kapt rootProject.ext.dependencies.aroutercompiler
implementation rootProject.ext.dependencies.mogologlib
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
compileOnly rootProject.ext.dependencies.modulecommon
} else {
compileOnly project(':modules:mogo-module-common')
implementation rootProject.ext.dependencies.mogoserviceapi
implementation rootProject.ext.dependencies.modulecommon
implementation rootProject.ext.dependencies.mogo_core_utils
implementation rootProject.ext.dependencies.mogo_core_function_api
implementation rootProject.ext.dependencies.mogo_core_function_call
implementation rootProject.ext.dependencies.mogo_core_data
}else {
implementation project(':services:mogo-service-api')
implementation project(':modules:mogo-module-common')
implementation project(':core:mogo-core-utils')
implementation project(':core:mogo-core-function-api')
implementation project(':core:mogo-core-function-call')
implementation project(':core:mogo-core-data')
}
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -0,0 +1,3 @@
GROUP=com.mogo.eagle.core.function.impl
POM_ARTIFACT_ID=devatools
VERSION_CODE=1

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zhjt.mogo_core_function_devatools">
</manifest>

View File

@@ -0,0 +1,31 @@
package com.zhjt.mogo_core_function_devatools
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchManager
@Route(path = MogoServicePaths.PATH_DEVA_TOOLS)
class DevaToolsProvider : IDevaToolsProvider {
override val functionName: String
get() = "DevaToolsProvider"
override fun init(context: Context) {
MogoLogCatchManager.init(context)
}
override fun startLogCatch() {
MogoLogCatchManager.startCatchLog()
}
override fun stopLogCatch() {
MogoLogCatchManager.stopCatchLog()
}
override fun onDestroy() {
MogoLogCatchManager.onDestroy()
}
}

View File

@@ -0,0 +1,28 @@
package com.zhjt.mogo_core_function_devatools.logcatch
class MogoLogCatchConst {
companion object{
const val LOG_PUSH_TYPE = 500000
/**
* 开始抓日志
*/
const val START_CATCH_LOG = 1
/**
* 结束抓日志
*/
const val STOP_CATCH_LOG = 2
/**
* 本应用设置,打开日志
*/
const val LOCAL_CONFIG_OPEN_LOG = 3
/**
* 本应用设置,关闭日志
*/
const val LOCAL_CONFIG_CLOSE_LOG = 4
}
}

View File

@@ -0,0 +1,168 @@
package com.zhjt.mogo_core_function_devatools.logcatch
import android.annotation.SuppressLint
import android.content.Context
import android.os.Handler
import android.os.Message
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
import com.mogo.eagle.core.network.NetConfig
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.module.common.MogoApisHandler
import com.mogo.service.cloud.socket.IMogoOnMessageListener
import com.mogo.utils.logger.LogLevel
import com.mogo.utils.logger.Logger
import com.zhidao.loglib.bean.RemoteLogPushContent
import com.zhidao.loglib.call.LogInfoManagerFactory
import com.zhidao.loglib.core.ILogListener
import com.zhidao.loglib.core.LogInfoManager
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.LOCAL_CONFIG_CLOSE_LOG
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.LOCAL_CONFIG_OPEN_LOG
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.LOG_PUSH_TYPE
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.START_CATCH_LOG
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.STOP_CATCH_LOG
import java.io.File
@SuppressLint("StaticFieldLeak")
object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handler.Callback,
ILogListener {
private const val TAG = "MogoLogCatchManager"
private const val MANUAL_CATCH_PKG_NAME = "manual-catch-log"
private const val MSG_TRY_CLOSE_LOG = 1001
private var mContext: Context? = null
private val handler = Handler(this)
private val manualContent = RemoteLogPushContent()
private val catchingList: MutableList<String> = mutableListOf()
private var logInfoManager: LogInfoManager? = null
fun init(context: Context) {
mContext = context
MogoApisHandler.getInstance().apis
.getSocketManagerApi(AbsMogoApplication.getApp().applicationContext)
.registerOnMessageListener(LOG_PUSH_TYPE, this)
manualContent.duration = 60
manualContent.pkgName = context.packageName
}
override fun target(): Class<RemoteLogPushContent> {
return RemoteLogPushContent::class.java
}
override fun onMsgReceived(obj: RemoteLogPushContent?) {
obj?.let {
Logger.d(TAG, "收到push消息: $obj")
when (obj.type) {
START_CATCH_LOG -> if (!catchingList.contains(obj.pkgName)) {
startCatchLog(obj)
}
STOP_CATCH_LOG -> stopCatchLog(obj)
LOCAL_CONFIG_OPEN_LOG -> openLoggerLevel()
LOCAL_CONFIG_CLOSE_LOG -> closeLoggerLevel()
else -> {
}
}
}
}
override fun handleMessage(msg: Message): Boolean {
if (msg.what == MSG_TRY_CLOSE_LOG) {
CallerDevaToolsListenerManager.invokeDevaToolsLogCatchClose()
closeLoggerLevel()
return true
}
return false
}
fun startCatchLog() {
if (catchingList.contains(MANUAL_CATCH_PKG_NAME)) {
TipToast.shortTip("已经在抓取日志了,请稍后再试")
} else {
Logger.d(TAG, "开始抓取日志====")
manualContent.type = START_CATCH_LOG
startCatchLog(manualContent)
}
}
fun stopCatchLog() {
Logger.d(TAG, "结束抓取日志====")
manualContent.type = STOP_CATCH_LOG
stopCatchLog(manualContent)
}
private fun startCatchLog(content: RemoteLogPushContent) {
catchingList.add(content.pkgName)
var delay = (content.duration * 60 * 1000).toLong()
handler.removeMessages(MSG_TRY_CLOSE_LOG)
if (delay <= 0) {
// 如果push 下来的delay小于等于0那就给个默认最大值一小时
delay = 60 * 60 * 1000L
}
handler.sendEmptyMessageDelayed(MSG_TRY_CLOSE_LOG, delay)
openLoggerLevel()
logInfoManager = LogInfoManagerFactory.createPushLogInfoManager(
mContext,
MoGoAiCloudClientConfig.getInstance().sn + File.separator + TimeUtils.formatYMD(System.currentTimeMillis()),
content, this)
logInfoManager?.start()
}
private fun stopCatchLog(content: RemoteLogPushContent) {
catchingList.remove(content.pkgName)
if (catchingList.isEmpty()) {
handler.removeMessages(MSG_TRY_CLOSE_LOG)
}
logInfoManager?.stop()
logInfoManager = null
closeLoggerLevel()
}
/**
* 放开Logger的限制
*/
private fun openLoggerLevel() {
Logger.init(LogLevel.DEBUG)
}
/**
* 根据状态收紧Logger的限制
*/
private fun closeLoggerLevel() {
if (catchingList.isNotEmpty()) {
Logger.init(if (DebugConfig.isDebug()) LogLevel.DEBUG else LogLevel.OFF)
NetConfig.instance().isLoggable = DebugConfig.isDebug()
}
}
override fun onError(errorCount: Int) {
ThreadUtils.runOnUiThread {
TipToast.shortTip("日志抓取出现错误,出错数量:$errorCount")
}
}
override fun onClose(pkgName: String?) {
ThreadUtils.runOnUiThread {
CallerDevaToolsListenerManager.invokeDevaToolsLogCatchClose()
TipToast.shortTip("日志抓取默认计时结束")
}
}
fun onDestroy() {
MogoApisHandler.getInstance().apis
.getSocketManagerApi(AbsMogoApplication.getApp().applicationContext)
.unregisterLifecycleListener(LOG_PUSH_TYPE)
if (handler.hasMessages(MSG_TRY_CLOSE_LOG)) {
handler.removeMessages(MSG_TRY_CLOSE_LOG)
}
manualContent.type = 0
logInfoManager = null
mContext = null
}
}

View File

@@ -18,11 +18,14 @@ import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.data.obu.ObuStatusInfo
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarStateListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
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.CallerAutopilotCarStatusListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
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
@@ -50,11 +53,11 @@ import kotlinx.android.synthetic.main.view_debug_setting.view.*
* 展示 本机、网络、工控机、OBU等状态信息支持设置IP等参数进行调试
*/
class DebugSettingView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr), IMoGoObuStatusListener,
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener, IMoGoMapLocationListener {
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener, IMoGoMapLocationListener {
private val TAG = "DebugSettingView"
@@ -133,7 +136,7 @@ class DebugSettingView @JvmOverloads constructor(
tvObuInfo.text = CallerObuListenerManager.getObuStatusInfoJsonString()
tvAutopilotInfo.text =
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString()
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString()
// 初始化App 配置信息
val appConfigInfo = AppConfigInfo()
@@ -151,7 +154,7 @@ class DebugSettingView @JvmOverloads constructor(
// 初始化OBU IP信息
val ipAddress =
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, "192.168.1.199")
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, "192.168.1.199")
etObuIP.setText(ipAddress)
etObuIP.text?.let { etObuIP.setSelection(it.length) }
@@ -191,18 +194,18 @@ class DebugSettingView @JvmOverloads constructor(
// 初始化 GSP数据源 数据
rgGpsProvider.check(
when (FunctionBuildConfig.gpsProvider) {
0 -> {
R.id.rbGpsProviderAndroid
}
1 -> {
R.id.rbGpsProviderRTK
}
2 -> {
R.id.rbGpsProviderOBU
}
else -> R.id.rbGpsProviderAndroid
when (FunctionBuildConfig.gpsProvider) {
0 -> {
R.id.rbGpsProviderAndroid
}
1 -> {
R.id.rbGpsProviderRTK
}
2 -> {
R.id.rbGpsProviderOBU
}
else -> R.id.rbGpsProviderAndroid
}
)
rgGpsProvider.setOnCheckedChangeListener { group, checkedId ->
when (checkedId) {
@@ -220,14 +223,14 @@ class DebugSettingView @JvmOverloads constructor(
// 初始化 感知数据是否绘制 选择情况
rgIsDrawIdentifyData.check(
when (FunctionBuildConfig.isDrawIdentifyData) {
true -> {
R.id.rbDraw
}
false -> {
R.id.rbDoNotDraw
}
when (FunctionBuildConfig.isDrawIdentifyData) {
true -> {
R.id.rbDraw
}
false -> {
R.id.rbDoNotDraw
}
}
)
rgIsDrawIdentifyData.setOnCheckedChangeListener { group, checkedId ->
when (checkedId) {
@@ -303,6 +306,25 @@ class DebugSettingView @JvmOverloads constructor(
CallerSmpManager.showPanel()
}
}
tbLogCatch.isChecked =
SharedPrefsMgr.getInstance(context).getBoolean(MoGoConfig.CATCH_LOG,false)
tbLogCatch.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) {
CallerDevaToolsManager.startCatchLog()
SharedPrefsMgr.getInstance(context).putBoolean(MoGoConfig.CATCH_LOG, true)
} else {
CallerDevaToolsManager.stopCatchLog()
SharedPrefsMgr.getInstance(context).putBoolean(MoGoConfig.CATCH_LOG, false)
}
}
CallerDevaToolsListenerManager.registerDevaToolsLogCatchListener(TAG,
object : IMoGoDevaToolsListener {
override fun onLogCatchClose() {
super.onLogCatchClose()
tbLogCatch.isChecked = false
}
})
}
/**

View File

@@ -242,6 +242,16 @@
android:textOn="打开「ADAS」Log"
android:textSize="@dimen/dp_34" />
<ToggleButton
android:id="@+id/tbLogCatch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:gravity="center"
android:textOff="开始抓取全量日志"
android:textOn="停止抓取全量日志"
android:textSize="@dimen/dp_34" />
</com.google.android.flexbox.FlexboxLayout>
</LinearLayout>
<!--地图呈现数据源控制-->

View File

@@ -48,7 +48,6 @@ dependencies {
implementation rootProject.ext.dependencies.androidxappcompat
implementation rootProject.ext.dependencies.boostmultidex
implementation rootProject.ext.dependencies.mogologlib
compileOnly rootProject.ext.dependencies.adasapi
compileOnly rootProject.ext.dependencies.adasconfigapi
@@ -62,6 +61,8 @@ dependencies {
implementation rootProject.ext.dependencies.mogoami
implementation rootProject.ext.dependencies.mogochainbase
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
api rootProject.ext.dependencies.mogoaicloudservicesdk
api rootProject.ext.dependencies.mogocommons
@@ -69,7 +70,6 @@ dependencies {
api rootProject.ext.dependencies.mogoservice
api rootProject.ext.dependencies.moduleV2x
api rootProject.ext.dependencies.moduleshare
api rootProject.ext.dependencies.mogomonitor
api rootProject.ext.dependencies.moduleextensions
api rootProject.ext.dependencies.modulemap
api rootProject.ext.dependencies.moduleADAS
@@ -93,6 +93,7 @@ dependencies {
api rootProject.ext.dependencies.mogo_core_function_map
api rootProject.ext.dependencies.mogo_core_function_v2x
api rootProject.ext.dependencies.mogo_core_function_monitoring
api rootProject.ext.dependencies.mogo_core_function_devatools
api rootProject.ext.dependencies.modulemain
} else {
@@ -102,7 +103,6 @@ dependencies {
api project(':modules:mogo-module-service')
api project(':modules:mogo-module-v2x')
api project(':modules:mogo-module-share')
api project(':modules:mogo-module-monitor')
api project(':modules:mogo-module-extensions')
api project(':modules:mogo-module-map')
api project(':modules:mogo-module-adas')
@@ -126,6 +126,7 @@ dependencies {
api project(':core:function-impl:mogo-core-function-notice')
api project(':core:function-impl:mogo-core-function-v2x')
api project(':core:function-impl:mogo-core-function-monitoring')
api project(':core:function-impl:mogo-core-function-devatools')
api project(":modules:mogo-module-main")
}

View File

@@ -2,6 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogo.eagle.core.function.main">
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />

View File

@@ -20,6 +20,7 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.notice.PushUIConstants;
import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils;
import com.mogo.eagle.core.utilcode.util.DeviceUtils;
import com.mogo.map.MapApiPath;
import com.mogo.module.carchatting.card.CallChatConstant;
import com.mogo.module.common.MogoApisHandler;
@@ -38,6 +39,7 @@ import com.mogo.utils.logger.Logger;
import com.mogo.utils.storage.SharedPrefsMgr;
import com.zhidao.boot.persistent.lib.PersistentManager;
import com.zhidao.support.obu.ami.AmiClientManager;
import com.zhjt.service.chain.core.ChainTraceStarter;
/**
* 默认初始化一些基础服务配置
@@ -57,6 +59,7 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
return;
}
start = System.currentTimeMillis();
ChainTraceStarter.start("com.mogo.launcher.f", DeviceUtils.getMacAddress());
// Crash 日志收集
initCrashConfig();
initLogConfig();
@@ -65,7 +68,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
initCloudClientConfig();
}
@Override
protected boolean shouldInit() {
Logger.w(TAG, "evaluate shouldInit() with: %s", ProcessUtils.getProcessName(Process.myPid()));
@@ -297,7 +299,9 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
MogoModulePaths.addBaseModule(new MogoModule(V2XConst.PATH_V2X_UI, V2XConst.MODULE_NAME));
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_STRATEGY_SHARE, "StrategyShare"));
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GAODE_AIMLESS_SHARE, "GaoDeAimlessShare"));
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_MOGO_MONITOR, "MogoMonitor"));
//mogo deva tools
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_DEVA_TOOLS, "IMoGoDevaToolsProvider"));
// 域控制器模块(新)
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AUTO_PILOT, "IMoGoAutoPilotProvider"));

View File

@@ -121,12 +121,12 @@ class MogoTrafficLightManager : IMogoCarLocationChangedListener2 {
// 检测是否开过路口,开过路口则停止读灯。并重置 trafficLightResult 值为 null
if (trafficLightResult != null && it.isInRange(loc.latitude, loc.longitude)) {
inRange = true
Logger.d(TAG, "进入路口")
// Logger.d(TAG, "进入路口")
CallTrafficLightListenerManager.invokeEnterCrossRoad(true)
return
}
if (inRange) {
Logger.d(TAG, "离开路口")
// Logger.d(TAG, "离开路口")
CallTrafficLightListenerManager.invokeEnterCrossRoad(false)
inRange = false
trafficLightResult = null

View File

@@ -3,8 +3,6 @@ package com.mogo.eagle.core.function.v2x.trafficlight.core
import android.os.Handler
import android.os.Looper
import android.os.Message
import com.mogo.eagle.core.function.v2x.trafficlight.TrafficLightConst
import com.mogo.utils.logger.Logger
class TrafficLightThreadHandler : Handler {

View File

@@ -100,7 +100,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
return
}
if (!exit) {
Logger.d(TAG, "路口,返回 , then resetConditions")
Logger.d(TAG, "路口,返回 , then resetConditions")
resetConditions()
return
}
@@ -121,13 +121,6 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
this.result = trafficLightResult
if (!turnLightFirst) {
// 首次判断,变灯
turnLightFirst = true
val controlTime = if (currentResult!!.isGreen()) 45 - currentResult.remain else 45
Logger.d(TAG, "触发变灯 , controlTime : $controlTime")
turnLight(controlTime)
}
lastResult?.let {
//如果上次结果和本次灯态结果变化比较大则已变灯控制HMI展示弹窗
if (abs(currentResult!!.remain - it.remain) > 5) {
@@ -149,6 +142,15 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
}
}
if (!turnLightFirst) {
// 首次判断,变灯
turnLightFirst = true
val controlTime = if (currentResult!!.isGreen()) 45 - currentResult.remain else 45
Logger.d(TAG, "触发变灯 , controlTime : $controlTime")
turnLight(controlTime)
}
//可作为补偿措施,暂不启用
// mLocation?.let {
// if (canGetThroughCross(it, trafficLightResult)) {

View File

@@ -12,4 +12,7 @@ object MoGoConfig {
// 域控制器 IP地址
const val AUTOPILOT_IP = "AUTOPILOT_IP"
// CMD全量日志抓取
const val CATCH_LOG = "CATCH_LOG"
}

View File

@@ -222,13 +222,6 @@ public class MogoServicePaths {
@Deprecated
public static final String PATH_AGREEMENT = "/agreement/showFragment";
/**
* 日志上传
*/
@Keep
@Deprecated
public static final String PATH_MOGO_MONITOR = "/monitor/api";
/**
* 探路api
*/
@@ -352,4 +345,11 @@ public class MogoServicePaths {
@Keep
@Deprecated
public static final String PATH_MAP_LOCATION_UPDATE_4_AUTO_PILOT = "/map_x/location_update";
/**
* deva开发套件
*/
@Keep
@Deprecated
public static final String PATH_DEVA_TOOLS = "/deva/tools";
}

View File

@@ -0,0 +1,13 @@
package com.mogo.eagle.core.function.api.devatools
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
/**
* 开发套件工具接口
*/
interface IDevaToolsProvider : IMoGoFunctionServerProvider {
fun startLogCatch()
fun stopLogCatch()
}

View File

@@ -0,0 +1,11 @@
package com.mogo.eagle.core.function.api.devatools
/**
* 开发套件工具接口
*/
interface IMoGoDevaToolsListener {
fun onLogCatchClose(){
}
}

View File

@@ -0,0 +1,66 @@
package com.mogo.eagle.core.function.call.devatools
import androidx.annotation.Nullable
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
import com.mogo.eagle.core.utilcode.util.LogUtils
import java.util.concurrent.ConcurrentHashMap
object CallerDevaToolsListenerManager {
private const val TAG = "CallDevaToolsListenerManager"
private val M_DEVA_TOOLS_LISTENER: ConcurrentHashMap<String, IMoGoDevaToolsListener> =
ConcurrentHashMap()
/**
* 添加监听
* @param tag 标记,用来注销监听使用
* @param listener 监听回调
*/
fun registerDevaToolsLogCatchListener(
@Nullable tag: String,
@Nullable listener: IMoGoDevaToolsListener
) {
if (M_DEVA_TOOLS_LISTENER.containsKey(tag)) {
LogUtils.eTag(TAG, "Tag:$tag already exists,please use other tag")
return
}
M_DEVA_TOOLS_LISTENER[tag] = listener
}
/**
* 删除监听
* @param tag 标记,用来注销监听使用
*/
fun unRegisterDevaToolsLogCatchListener(@Nullable tag: String) {
if (!M_DEVA_TOOLS_LISTENER.containsKey(tag)) {
LogUtils.eTag(TAG, "Tag:$tag not exists")
return
}
M_DEVA_TOOLS_LISTENER.remove(tag)
}
/**
* 删除监听
* @param listener 要删除的监听对象
*/
fun unRegisterDevaToolsLogCatchListener(@Nullable listener: IMoGoDevaToolsListener) {
if (!M_DEVA_TOOLS_LISTENER.containsValue(listener)) {
LogUtils.eTag(TAG, "listener:$listener not exists")
return
}
M_DEVA_TOOLS_LISTENER.forEach {
if (it.value == listener) {
M_DEVA_TOOLS_LISTENER.remove(it.key)
}
}
}
fun invokeDevaToolsLogCatchClose() {
M_DEVA_TOOLS_LISTENER.forEach {
val listener = it.value
listener.onLogCatchClose()
}
}
}

View File

@@ -0,0 +1,26 @@
package com.mogo.eagle.core.function.call.devatools
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_DEVA_TOOLS
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
object CallerDevaToolsManager {
private val devaToolsProviderApi: IDevaToolsProvider
get() = ARouter.getInstance().build(PATH_DEVA_TOOLS)
.navigation() as IDevaToolsProvider
/**
* 开始抓取全量日志
*/
fun startCatchLog() {
devaToolsProviderApi.startLogCatch()
}
/**
* 停止抓取全量日志
*/
fun stopCatchLog() {
devaToolsProviderApi.stopLogCatch()
}
}

View File

@@ -55,6 +55,14 @@ public final class TimeUtils {
throw new UnsupportedOperationException("u can't instantiate me...");
}
@SuppressLint("SimpleDateFormat")
public static String formatYMD(long time){
Date date = new Date(time);
String strDateFormat = "yyyy-MM-dd";
SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
return sdf.format(date);
}
/**
* Milliseconds to the formatted time string.
* <p>The pattern is {@code yyyy-MM-dd HH:mm:ss}.</p>

View File

@@ -56,11 +56,11 @@ bytex.forbidUseLenientMutationDuringGetArtifact=true
bytex.verifyProguardConfigurationChanged=false
bytex.ASM_API=ASM7
HOOK_LOG_VERSION=1.4.90
SERVICE_CHAIN_VERSION=1.0.32
HOOK_LOG_VERSION=1.4.109
SERVICE_CHAIN_VERSION=1.0.43
################ 外部依赖引用 ################
# loglib
LOGLIB_VERSION=1.0.4
LOGLIB_VERSION=1.1.6
######## MogoAiCloudSDK Version ########
# 网络请求
MOGO_NETWORK_VERSION=1.3.13

View File

@@ -38,11 +38,11 @@
:modules:mogo-module-main
:modules:mogo-module-push-base
:modules:mogo-module-push
:modules:mogo-module-monitor
:core:function-impl:mogo-core-function-autopilot
:core:function-impl:mogo-core-function-hmi
:core:function-impl:mogo-core-function-map
:core:function-impl:mogo-core-function-monitoring
:core:function-impl:mogo-core-function-notice
:core:function-impl:mogo-core-function-v2x
:core:function-impl:mogo-core-function-devatools
:core:function-impl:mogo-core-function-main

View File

@@ -270,11 +270,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
if (DebugConfig.isDebug()) {
mUploadRoadCondition.setOnLongClickListener(view -> {
mApis.getMogoMonitorApi().getMogoMonitorLog().showLogDebugDialog();
return true;
});
mUserHeadImg.setOnLongClickListener(view -> {
if (groupFix.getVisibility() == View.VISIBLE) {
groupFix.setVisibility(View.GONE);

View File

@@ -1 +0,0 @@
-keep class com.zhidao.mogo.module.monitor.MogoMonitorConst.*{*;}

View File

@@ -1,3 +0,0 @@
GROUP=com.mogo.module
POM_ARTIFACT_ID=module-monitor
VERSION_CODE=1

View File

@@ -1,5 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zhidao.mogo.module.monitor">
/
</manifest>

View File

@@ -1,30 +0,0 @@
package com.zhidao.mogo.module.monitor;
public class MogoMonitorConst {
private MogoMonitorConst(){}
public static final String MODULE_NAME = "MogoMonitor";
public static final String MODULE_PATH = "/monitor/api";
public static final int LOG_PUSH_TYPE = 500000;
/**
* 开始抓日志
*/
public static final int START_CATCH_LOG = 1;
/**
* 结束抓日志
*/
public static final int STOP_CATCH_LOG = 2;
/**
* 本应用设置,打开日志
*/
public static final int LOCAL_CONFIG_OPEN_LOG = 3;
/**
* 本应用设置,关闭日志
*/
public static final int LOCAL_CONFIG_CLOSE_LOG = 4;
public static final String BROADCAST_LOG_CTRL = "com.mogo.control.action.LOG_CTRL";
}

View File

@@ -1,28 +0,0 @@
package com.zhidao.mogo.module.monitor;
import android.content.Context;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.service.monitor.IMogoMonitorLog;
import com.mogo.service.monitor.IMogoMonitorProvider;
import com.zhidao.mogo.module.monitor.log.MogoLogMonitor;
/**
* 应用监控模块provider
*
* @author tongchenfei
*/
@Route(path = MogoMonitorConst.MODULE_PATH)
public class MogoMonitorProvider implements IMogoMonitorProvider {
@Override
public void init(Context context) {
MogoLogMonitor.getInstance().init(context);
}
@Override
public IMogoMonitorLog getMogoMonitorLog() {
return MogoLogMonitor.getInstance();
}
}

View File

@@ -1,62 +0,0 @@
package com.zhidao.mogo.module.monitor.bean;
public class RemoteLogPushContent {
private int type;
/**
* 日志抓取时长,单位是分钟
*/
private int duration;
private String cmd;
private String pkgName;
public RemoteLogPushContent(){
}
public RemoteLogPushContent(int duration, String pkgName) {
this.duration = duration;
this.pkgName = pkgName;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getCmd() {
return cmd;
}
public void setCmd(String cmd) {
this.cmd = cmd;
}
public int getDuration() {
return duration;
}
public void setDuration(int duration) {
this.duration = duration;
}
public String getPkgName() {
return pkgName;
}
public void setPkgName(String pkgName) {
this.pkgName = pkgName;
}
@Override
public String toString() {
return "RemoteLogPushContent{" +
"type=" + type +
", duration=" + duration +
", cmd='" + cmd + '\'' +
", pkgName='" + pkgName + '\'' +
'}';
}
}

View File

@@ -1,17 +0,0 @@
package com.zhidao.mogo.module.monitor.dialog;
/**
* Log调试对话框操作回调
* @author tongchenfei
*/
public interface ILogDialogListener {
/**
* 点击了开始抓日志
*/
void onLogStart();
/**
* 点击了结束抓日志
*/
void onLogStop();
}

View File

@@ -1,46 +0,0 @@
package com.zhidao.mogo.module.monitor.dialog;
import android.content.Context;
import androidx.annotation.NonNull;
import com.mogo.module.common.dialog.BaseFloatDialog;
import com.zhidao.mogo.module.monitor.R;
/**
* 日志手动调用开始结束的对话框兼容了智慧出行覆盖adas浮窗
*
* @author tongchenfei
*/
public class LogDebugDialog extends BaseFloatDialog {
public LogDebugDialog(@NonNull Context context) {
super(context);
setContentView(R.layout.dialog_log_debug);
findViewById(R.id.btnStart).setOnClickListener(v -> {
if (dialogListener != null) {
dialogListener.onLogStart();
}
dismiss();
});
findViewById(R.id.btnStop).setOnClickListener(v->{
if (dialogListener != null) {
dialogListener.onLogStop();
}
dismiss();
});
findViewById(R.id.btnForceClearNotice).setOnClickListener(v->{
dismiss();
});
findViewById(R.id.btnRetryFlow).setOnClickListener(v->{
dismiss();
});
}
private ILogDialogListener dialogListener;
public void setDialogListener(ILogDialogListener dialogListener) {
this.dialogListener = dialogListener;
}
}

View File

@@ -1,199 +0,0 @@
package com.zhidao.mogo.module.monitor.log;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import android.widget.Toast;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.context.ContextHolderUtil;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.network.NetConfig;
import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.service.cloud.socket.IMogoOnMessageListener;
import com.mogo.service.monitor.IMogoMonitorLog;
import com.mogo.utils.logger.LogLevel;
import com.mogo.utils.logger.Logger;
import com.zhidao.mogo.module.monitor.MogoMonitorConst;
import com.zhidao.mogo.module.monitor.bean.RemoteLogPushContent;
import com.zhidao.mogo.module.monitor.dialog.ILogDialogListener;
import com.zhidao.mogo.module.monitor.dialog.LogDebugDialog;
import java.util.ArrayList;
import java.util.List;
import static com.zhidao.mogo.module.monitor.MogoMonitorConst.LOG_PUSH_TYPE;
import static com.zhidao.mogo.module.monitor.MogoMonitorConst.MODULE_NAME;
public class MogoLogMonitor implements IMogoOnMessageListener<RemoteLogPushContent>, IMogoMonitorLog,
ILogDialogListener, Handler.Callback {
private static final String TAG = MODULE_NAME + "-Log";
private static volatile MogoLogMonitor mogoLogMonitor;
private MogoLogMonitor() {
}
public static MogoLogMonitor getInstance() {
if (mogoLogMonitor == null) {
synchronized (MogoLogMonitor.class) {
if (mogoLogMonitor == null) {
mogoLogMonitor = new MogoLogMonitor();
}
}
}
return mogoLogMonitor;
}
private static final int MSG_TRY_CLOSE_LOG = 1001;
private static final String MANUAL_CATCH_PKG_NAME = "manual-catch-log";
private LogDebugDialog logDebugDialog;
private RemoteLogPushContent manualContent = new RemoteLogPushContent(60,
MANUAL_CATCH_PKG_NAME);
private Handler handler = new Handler(this);
private List<String> catchingList = new ArrayList<>();
public void init(Context context) {
MogoApisHandler.getInstance().getApis()
.getSocketManagerApi(AbsMogoApplication.getApp().getApplicationContext())
.registerOnMessageListener(LOG_PUSH_TYPE, this);
startRemoteCtrl(context);
}
private void startRemoteCtrl(Context context) {
Intent intent = new Intent("com.mogo.remotecontrol.action");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
ComponentName comp = new ComponentName("com.mogo.remotecontrol",
"com.mogo.remotecontrol.RemoteCtrlService");
intent.setComponent(comp);
context.startService(intent);
Logger.d(TAG, "startRemoteCtrl");
}
@Override
public boolean handleMessage(Message msg) {
if (msg.what == MSG_TRY_CLOSE_LOG) {
closeLoggerLevel();
return true;
}
return false;
}
@Override
public Class<RemoteLogPushContent> target() {
return RemoteLogPushContent.class;
}
@Override
public void onMsgReceived(RemoteLogPushContent obj) {
Logger.d(TAG, "收到push消息: " + obj);
switch (obj.getType()) {
case MogoMonitorConst.START_CATCH_LOG:
if (!catchingList.contains(obj.getPkgName())) {
startCatchLog(obj);
}
break;
case MogoMonitorConst.STOP_CATCH_LOG:
stopCatchLog(obj);
break;
case MogoMonitorConst.LOCAL_CONFIG_OPEN_LOG:
openLoggerLevel();
break;
case MogoMonitorConst.LOCAL_CONFIG_CLOSE_LOG:
closeLoggerLevel();
break;
default:
break;
}
}
@Override
public void onLogStart() {
// 这个是通过对话框点击开始的回调
if (catchingList.contains(MANUAL_CATCH_PKG_NAME)) {
Toast.makeText(ContextHolderUtil.getContext(), "已经在抓日志了", Toast.LENGTH_LONG).show();
} else {
Logger.d(TAG, "开始抓取日志====");
manualContent.setType(MogoMonitorConst.START_CATCH_LOG);
startCatchLog(manualContent);
}
}
@Override
public void onLogStop() {
// 这个是通过对话框点击结束的回调
Logger.d(TAG, "结束抓取日志====");
manualContent.setType(MogoMonitorConst.STOP_CATCH_LOG);
stopCatchLog(manualContent);
}
public void sendCtrlBroadcast(RemoteLogPushContent content) {
startRemoteCtrl(ContextHolderUtil.getContext());
Intent intent = new Intent(MogoMonitorConst.BROADCAST_LOG_CTRL);
intent.putExtra("content", GsonUtil.jsonFromObject(content));
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
intent.addFlags(Intent.FLAG_EXCLUDE_STOPPED_PACKAGES);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Logger.d(TAG, "sendCtrlBroadcast: " + content);
ContextHolderUtil.getContext().sendBroadcast(intent);
}
/**
* 放开Logger的限制
*/
private void openLoggerLevel() {
Logger.init(LogLevel.DEBUG);
}
/**
* 根据状态收紧Logger的限制
*/
private void closeLoggerLevel() {
if (!catchingList.isEmpty()) {
Logger.init(DebugConfig.isDebug() ? LogLevel.DEBUG : LogLevel.OFF);
NetConfig.instance().setLoggable(DebugConfig.isDebug());
}
}
private void startCatchLog(RemoteLogPushContent content) {
catchingList.add(content.getPkgName());
long delay = content.getDuration() * 60 * 1000;
handler.removeMessages(MSG_TRY_CLOSE_LOG);
if (delay <= 0) {
// 如果push 下来的delay小于等于0那就给个默认最大值一小时
delay = 60 * 60 * 1000L;
}
handler.sendEmptyMessageDelayed(MSG_TRY_CLOSE_LOG, delay);
openLoggerLevel();
sendCtrlBroadcast(content);
}
private void stopCatchLog(RemoteLogPushContent content) {
catchingList.remove(content.getPkgName());
if (catchingList.isEmpty()) {
handler.removeMessages(MSG_TRY_CLOSE_LOG);
}
sendCtrlBroadcast(content);
closeLoggerLevel();
}
@Override
public void showLogDebugDialog() {
if (logDebugDialog == null) {
logDebugDialog = new LogDebugDialog(ContextHolderUtil.getContext());
logDebugDialog.setDialogListener(this);
}
if (logDebugDialog.isShowing()) {
return;
}
logDebugDialog.show();
}
}

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="20dp" />
<gradient
android:angle="-45"
android:startColor="#3F4057"
android:endColor="#2A2B38" />
<padding
android:left="20dp"
android:right="20dp"
android:top="20dp"
android:bottom="20dp" />
</shape>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape>
<corners android:radius="16dp" />
<gradient android:angle="135" android:endColor="#CC0033" android:startColor="#FF3366" />
<padding android:right="20dp" android:left="20dp" android:top="10dp" android:bottom="10dp" />
</shape>
</item>
<item>
<shape>
<corners android:radius="16dp" />
<gradient android:angle="135" android:endColor="#FF3333" android:startColor="#FF3366" />
<padding android:right="20dp" android:left="20dp" android:top="10dp" android:bottom="10dp" />
</shape>
</item>
</selector>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<gradient android:angle="135" android:endColor="#ff113361" android:startColor="#ff124B98" android:type="linear" />
<corners android:radius="16dp" />
<padding android:right="20dp" android:left="20dp" android:top="10dp" android:bottom="10dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<gradient android:angle="135" android:endColor="#ff1e57a4" android:startColor="#ff1f7eff" android:type="linear" />
<corners android:radius="16dp" />
<padding android:right="20dp" android:left="20dp" android:top="10dp" android:bottom="10dp" />
</shape>
</item>
</selector>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape>
<corners android:radius="16dp" />
<gradient android:angle="135" android:endColor="#1C1E28" android:startColor="#242737" />
<padding android:right="20dp" android:left="20dp" android:top="10dp" android:bottom="10dp" />
</shape>
</item>
<item>
<shape>
<corners android:radius="16dp" />
<gradient android:angle="135" android:endColor="#48495E" android:startColor="#616381" />
<padding android:right="20dp" android:left="20dp" android:top="10dp" android:bottom="10dp" />
</shape>
</item>
</selector>

View File

@@ -1,76 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/log_debug_dialog_bg">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/tvLogDebugTitle"
android:text="日志抓取工具"
android:textSize="28sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:textColor="#fff" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnStart"
android:background="@drawable/log_debug_start_btn_bg"
android:text="开始抓取"
android:textSize="20sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvLogDebugTitle"
app:layout_constraintRight_toLeftOf="@+id/btnStop"
android:layout_marginTop="20dp"
android:textColor="#fff" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnStop"
android:background="@drawable/log_debug_stop_btn_bg"
android:text="结束抓取"
app:layout_constraintTop_toTopOf="@id/btnStart"
app:layout_constraintLeft_toRightOf="@id/btnStart"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginLeft="20dp"
android:textSize="20sp"
android:textColor="#fff" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnForceClearNotice"
android:background="@drawable/log_debug_stop_btn_bg"
android:text="关闭日志抓取提示"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnStart"
android:layout_marginTop="20dp"
android:textSize="20sp"
android:textColor="#fff" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnRetryFlow"
android:background="@drawable/log_debug_retry_btn_bg"
android:text="若有上传失败,点此重试"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnForceClearNotice"
android:layout_marginTop="20dp"
android:visibility="gone"
android:textSize="20sp"
android:textColor="#fff" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View File

@@ -21,7 +21,6 @@ import com.mogo.service.map.IMogoMapService;
import com.mogo.service.module.IMogoActionManager;
import com.mogo.service.module.IMogoMarkerService;
import com.mogo.service.module.IMogoRegisterCenter;
import com.mogo.service.monitor.IMogoMonitorProvider;
import com.mogo.service.network.IMogoNetwork;
import com.mogo.service.obu.IMogoCrashWarnProvider;
import com.mogo.service.share.IMogoShareManager;
@@ -227,13 +226,6 @@ public interface IMogoServiceApis extends IProvider {
*/
IMogoTanluProvider getTanluApi();
/**
* 获取Monitor相关api
*
* @return
*/
IMogoMonitorProvider getMogoMonitorApi();
/**
* 获取探路ui服务
*

View File

@@ -1,9 +0,0 @@
package com.mogo.service.monitor;
public interface IMogoMonitorLog {
/**
* 显示日志抓取窗口
*/
void showLogDebugDialog();
}

View File

@@ -1,19 +0,0 @@
package com.mogo.service.monitor;
import android.content.Context;
import com.alibaba.android.arouter.facade.template.IProvider;
/**
* monitor接口
* @author tongchenfei
*/
public interface IMogoMonitorProvider extends IProvider {
/**
* 获取日志监控接口
* @return
*/
IMogoMonitorLog getMogoMonitorLog();
}

View File

@@ -29,7 +29,6 @@ import com.mogo.service.map.IMogoMapService;
import com.mogo.service.module.IMogoActionManager;
import com.mogo.service.module.IMogoMarkerService;
import com.mogo.service.module.IMogoRegisterCenter;
import com.mogo.service.monitor.IMogoMonitorProvider;
import com.mogo.service.network.IMogoNetwork;
import com.mogo.service.share.IMogoShareManager;
import com.mogo.service.share.IMogoTanluProvider;
@@ -196,11 +195,6 @@ public class MogoServiceApis implements IMogoServiceApis {
return getApiInstance(IMogoTanluProvider.class, MogoServicePaths.PATH_TANLU_API);
}
@Override
public IMogoMonitorProvider getMogoMonitorApi() {
return getApiInstance(IMogoMonitorProvider.class, MogoServicePaths.PATH_MOGO_MONITOR);
}
@Override
public IMogoTanluUiProvider getTanluUiApi() {
return getApiInstance(IMogoTanluUiProvider.class, MogoServicePaths.PATH_TANLU_UI_API);

View File

@@ -15,6 +15,10 @@ include ':core:mogo-core-network'
include ':core:mogo-core-function-api'
// 模块对外暴露等调用接口
include ':core:mogo-core-function-call'
// deva开发工具套件
include ':core:function-impl:mogo-core-function-devatools'
// 业务实现
// Main 应用主入口封装,在这里进行初始化应用
include ':core:function-impl:mogo-core-function-main'
@@ -54,7 +58,6 @@ include ':libraries:map-autonavi'
include ':libraries:mogo-map'
// OLD业务模块
include ':modules:mogo-module-monitor'
include ':modules:mogo-module-adas'
include ':modules:mogo-module-map'
include ':modules:mogo-module-common'