Merge branch 'dev_arch_opt_3.0' into dev_robosweeper-d_app-module_221230_1.1.0

# Conflicts:
#	core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/report/IPCReportManager.kt
This commit is contained in:
bxb
2023-03-08 19:25:46 +08:00
87 changed files with 1765 additions and 583 deletions

View File

@@ -98,20 +98,20 @@
</activity>
<activity
android:name="com.mogo.eagle.core.function.main.VideoAdAtc"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
android:enabled="true"
android:exported="true"
android:process=":video_ad"
android:resizeableActivity="false"
android:resumeWhilePausing="true"
android:screenOrientation="landscape"
android:stateNotNeeded="true"
android:theme="@style/Main"
android:windowSoftInputMode="adjustPan|stateHidden">
<!-- <activity-->
<!-- android:name="com.mogo.eagle.core.function.main.VideoAdAtc"-->
<!-- android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"-->
<!-- android:enabled="true"-->
<!-- android:exported="true"-->
<!-- android:process=":video_ad"-->
<!-- android:resizeableActivity="false"-->
<!-- android:resumeWhilePausing="true"-->
<!-- android:screenOrientation="landscape"-->
<!-- android:stateNotNeeded="true"-->
<!-- android:theme="@style/Main"-->
<!-- android:windowSoftInputMode="adjustPan|stateHidden">-->
</activity>
<!-- </activity>-->
<activity
android:name="com.mogo.eagle.core.function.main.AppListActivity"

View File

@@ -9,6 +9,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.data.msgbox.OperationMsg
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
@@ -62,6 +63,16 @@ class MMsgBoxBubbleView @JvmOverloads constructor(
mMsgBoxBubbleAdapter?.setData(dataList)
}
}
if(msgBoxList.type == MsgBoxType.OPERATION){
if((msgBoxList.bean as OperationMsg).type == 2){
MsgBoxConfig.noticeList.add(msgBoxList)
if(isShowData){
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
dataList.add(msgBoxList)
mMsgBoxBubbleAdapter?.setData(dataList)
}
}
}
}
}
}

View File

@@ -10,6 +10,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.data.msgbox.OperationMsg
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
@@ -64,6 +65,15 @@ class MMsgBoxListView @JvmOverloads constructor(
mMsgBoxListAdapter?.setData(it)
}
}
if(msgBoxList.type == MsgBoxType.OPERATION){
if((msgBoxList.bean as OperationMsg).type == 2){
noticeList?.add(0,msgBoxList)
noticeList?.let {
mMsgBoxListAdapter?.setData(it)
}
}
}
}
}
}

View File

@@ -367,7 +367,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
holder.tvV2XContent.text = v2XMsg.content
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type))
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type))
)
}
}

View File

@@ -28,6 +28,7 @@ class MMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter
private val notice: Int = 1
private val v2x: Int = 2
private val summary: Int = 3
private val operation: Int = 4
var countDownTimer: CountDownTimer?=null
@@ -49,6 +50,10 @@ class MMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_m_msg_box_summary,parent,false)
BubbleSummaryHolder(view)
}
operation -> {
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_m_msg_box_operation,parent,false)
BubbleOperationHolder(view)
}
else -> {
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_m_msg_box_v2x,parent,false)
BubbleV2XHolder(view)
@@ -120,6 +125,13 @@ class MMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter
}
}
}
is BubbleOperationHolder ->{
data?.let {
val operationMsg = it[position].bean as OperationMsg
holder.tvMOperationTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvMOperationContent.text = operationMsg.content
}
}
}
val msgBoxBean: MsgBoxBean = data!![position]
@@ -146,6 +158,8 @@ class MMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter
notice
}else if(data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY){
summary
}else if(data!![position].type == MsgBoxType.OPERATION){
operation
} else{
v2x
}
@@ -175,4 +189,10 @@ class MMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter
var tvMSummaryTime: TextView = itemView.findViewById(R.id.tvMSummaryTime)
}
//通知消息
class BubbleOperationHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var tvMOperationTime: TextView = itemView.findViewById(R.id.tvMOperationTime)
var tvMOperationContent: TextView = itemView.findViewById(R.id.tvMOperationContent)
}
}

View File

@@ -9,10 +9,7 @@ import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.NoticeFrCloudMsg
import com.mogo.eagle.core.data.msgbox.V2XMsg
import com.mogo.eagle.core.data.msgbox.*
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.hmi.R
@@ -28,6 +25,7 @@ class MMsgBoxListAdapter(private val activity: Activity): RecyclerView.Adapter<R
private val notice: Int = 1
private val v2x: Int = 2
private val summary: Int = 3
private val operation: Int = 4
fun setData(data: List<MsgBoxBean>){
this.data = data
@@ -44,6 +42,10 @@ class MMsgBoxListAdapter(private val activity: Activity): RecyclerView.Adapter<R
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_m_msg_list_summary,parent,false)
ListSummaryHolder(view)
}
operation -> {
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_m_msg_list_operation,parent,false)
ListOperationHolder(view)
}
else -> {
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_m_msg_list_v2x,parent,false)
ListV2XHolder(view)
@@ -111,6 +113,13 @@ class MMsgBoxListAdapter(private val activity: Activity): RecyclerView.Adapter<R
}
}
}
is ListOperationHolder -> {
data?.let {
val operationMsg = it[position].bean as OperationMsg
holder.tvMOperationTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvMOperationContent.text = operationMsg.content
}
}
}
}
@@ -121,7 +130,9 @@ class MMsgBoxListAdapter(private val activity: Activity): RecyclerView.Adapter<R
notice
}else if(data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY){
summary
} else{
}else if(data!![position].type == MsgBoxType.OPERATION){
operation
}else{
v2x
}
}
@@ -149,4 +160,10 @@ class MMsgBoxListAdapter(private val activity: Activity): RecyclerView.Adapter<R
var tvMSummaryTime: TextView = itemView.findViewById(R.id.tvMSummaryTime)
}
//运营消息
class ListOperationHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var tvMOperationTime: TextView = itemView.findViewById(R.id.tvMOperationTime)
var tvMOperationContent: TextView = itemView.findViewById(R.id.tvMOperationContent)
}
}

View File

@@ -9,6 +9,7 @@ import android.graphics.Color
import android.os.Build
import android.text.Html
import android.util.AttributeSet
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import androidx.annotation.RequiresApi
@@ -21,6 +22,7 @@ import chassis.Chassis
import chassis.ChassisStatesOuterClass
import com.mogo.cloud.passport.MoGoAiCloudClient
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.constants.SharedPrefsConstants
import com.mogo.commons.debug.DebugConfig
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.eagle.core.data.app.AppConfigInfo
@@ -76,6 +78,8 @@ import com.mogo.eagle.core.utilcode.util.*
import com.mogo.map.uicontroller.VisualAngleMode
import com.mogo.map.uicontroller.VisualAngleMode.*
import kotlinx.android.synthetic.main.view_debug_setting.view.*
import kotlinx.android.synthetic.main.view_debug_setting.view.tbRouteDynamicEffect
import kotlinx.android.synthetic.main.view_sop_setting.view.*
import kotlinx.coroutines.launch
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
@@ -123,6 +127,7 @@ internal class DebugSettingView @JvmOverloads constructor(
private var logInfoView: LogInfoView? = null
private var logViewAttach = false
@Volatile
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
private var mGnssInfo: MogoLocation? = null
@@ -132,15 +137,19 @@ internal class DebugSettingView @JvmOverloads constructor(
private var accelerationThresholdNum: Double = 0.0
// 感知识别「已知类型」数据个数
@Volatile
private var mIdentifyDataSize = 0
// 感知识别「未知类型」数据个数
@Volatile
private var mUnknownIdentifyDataSize = 0
// 引导线点个数
@Volatile
private var mTrajectoryInfoSize = 0
// 全局路径规划点个数
@Volatile
private var mRouteInfoSize = 0
//日志过滤标签集合
@@ -208,7 +217,6 @@ internal class DebugSettingView @JvmOverloads constructor(
CallerChassisGearStateListenerManager.addListener(TAG, this)
CallerChassisSteeringStateListenerManager.addListener(TAG, this)
CallerChassisThrottleStateListenerManager.addListener(TAG, this)
//添加 开发套件工具接口 监听
CallerDevaToolsListenerManager.addListener(TAG, this)
//添加 底盘灯光数据 监听
@@ -259,6 +267,7 @@ internal class DebugSettingView @JvmOverloads constructor(
CallerChassisLamplightListenerManager.removeListener(TAG)
// 移除 obu获取信息 监听
CallerObuInfoListenerManager.removeListener(TAG)
// 移除 业务配置监听
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(
FuncBizConfig.FOUNDATION,
@@ -296,21 +305,22 @@ internal class DebugSettingView @JvmOverloads constructor(
}
}
/**
* 魔戒控制
*/
tbMojie.setOnCheckedChangeListener { buttonView, isChecked ->
if (isChecked) {
buttonView.setCompoundDrawables(null, null, iconDown, null)
btnOpenAllGestures.visibility = View.VISIBLE
tbOpenMfView.visibility = View.VISIBLE
} else {
buttonView.setCompoundDrawables(null, null, iconRight, null)
btnOpenAllGestures.visibility = View.GONE
tbOpenMfView.visibility = View.GONE
}
}
btnOpenAllGestures.setOnClickListener {
CallerMapUIServiceManager.getMapUIController()?.setAllGesturesEnabled(true)
/**
* 蘑方控制 默认关闭
*/
tbOpenMfView.isChecked = HmiBuildConfig.isShowMfToastView
tbOpenMfView.setOnCheckedChangeListener { _, isChecked ->
HmiBuildConfig.isShowMfToastView = isChecked
}
/**
@@ -361,6 +371,7 @@ internal class DebugSettingView @JvmOverloads constructor(
swDevelopMode.visibility = View.GONE
}
}
/**
* 开发者模式
*/
@@ -634,12 +645,6 @@ internal class DebugSettingView @JvmOverloads constructor(
FunctionBuildConfig.isBeautyMode = isChecked
}
tbV2NFromCar.isChecked = FunctionBuildConfig.isV2NFromCar
//v2n车端预警
tbV2NFromCar.setOnCheckedChangeListener { _, isChecked ->
FunctionBuildConfig.isV2NFromCar = isChecked
}
tbDrawAiCloudFusion.isChecked = FunctionBuildConfig.isDrawAiCloudFusion
//云端感知绘制
tbDrawAiCloudFusion.setOnCheckedChangeListener { _, isChecked ->
@@ -1597,6 +1602,7 @@ internal class DebugSettingView @JvmOverloads constructor(
tvAutopilotInfo.text = autopilotJson
tvIpcInfo.text = autopilotJson
tvIpcInfoKey.text = autopilotJson
tvCmdbCarInfoContent.text = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.CAR_INFO)
tvCarInfo.text =
"GPS时间${(mGnssInfo?.satelliteTime?.times(1000))?.toLong()}\n" +
@@ -2056,4 +2062,5 @@ internal class DebugSettingView @JvmOverloads constructor(
override fun onObuDeviceId(obuDeviceId: String) {
mObuDeviceId = obuDeviceId
}
}

View File

@@ -73,11 +73,11 @@ internal class SOPSettingView @JvmOverloads constructor(
/**
* obu弱势交通控制
*/
tbObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
tbObuWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
// 默认开启
HmiBuildConfig.isShowObuWeaknessTrafficView = !isChecked
}
// tbObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
// tbObuWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
// // 默认开启
// HmiBuildConfig.isShowObuWeaknessTrafficView = !isChecked
// }
/**
* 云端弱势交通控制
@@ -88,14 +88,6 @@ internal class SOPSettingView @JvmOverloads constructor(
HmiBuildConfig.isShowCloudWeaknessTrafficView = isChecked
}
/**
* 限速数据来源开关
*/
tbRoadLimitSpeedSop.setOnCheckedChangeListener { _, isChecked ->
// 默认关闭
HmiBuildConfig.isShowObuLimitSpeedView = isChecked
}
/**
* obu V2V开关默认打开
*/

View File

@@ -1,36 +0,0 @@
package com.mogo.eagle.core.function.hmi.ui.setting
import android.content.Context
import android.util.AttributeSet
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
/**
* @author XuXinChao
* @description fix java.lang.IndexOutOfBoundsException检测到不一致。视图持有者适配器positionViewHolder无效
* @since: 2022/6/7
*/
class WrapContentLinearLayoutManager : LinearLayoutManager {
constructor(context: Context?) : super(context) {}
constructor(context: Context?, orientation: Int, reverseLayout: Boolean) : super(
context,
orientation,
reverseLayout
) {}
constructor(
context: Context?,
attrs: AttributeSet?,
defStyleAttr: Int,
defStyleRes: Int
) : super(context, attrs, defStyleAttr, defStyleRes) {}
override fun onLayoutChildren(recycler: RecyclerView.Recycler?, state: RecyclerView.State?) {
try {
super.onLayoutChildren(recycler, state)
} catch (e: IndexOutOfBoundsException) {
e.printStackTrace()
}
}
}

View File

@@ -51,6 +51,7 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
private var clickListener: ClickListener? = null
private var keyBoardUtil: KeyBoardUtil? = null
@Volatile
private var connectStatus = false
private var lastTime = 0L

View File

@@ -40,6 +40,7 @@ class PncActionsView @JvmOverloads constructor(
@Volatile
private var mTrafficLightResult: TrafficLightResult? = null
@Volatile
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
private val bgResources: Int

View File

@@ -11,6 +11,7 @@ import android.view.View
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import kotlin.math.abs
@@ -139,17 +140,19 @@ class BatteryView : View , IMoGoSkinModeChangeListener {
}
override fun onSkinModeChange(skinMode: Int) {
when (skinMode) {
0 -> {
batteryColor = resources.getColor(R.color.color_27FFFFFF)
powerColor = Color.WHITE
}
1 -> {
batteryColor = resources.getColor(R.color.color_1E111111)
powerColor = resources.getColor(R.color.color_2C2E30)
ThreadUtils.runOnUiThread {
when (skinMode) {
0 -> {
batteryColor = resources.getColor(R.color.color_27FFFFFF)
powerColor = Color.WHITE
}
1 -> {
batteryColor = resources.getColor(R.color.color_1E111111)
powerColor = resources.getColor(R.color.color_2C2E30)
}
}
invalidate()
}
invalidate()
}
override fun onAttachedToWindow() {

View File

@@ -29,7 +29,9 @@ class CheckSystemView @JvmOverloads constructor(
const val TAG = "CheckSystemView"
}
@Volatile
private var connectStatus = false //是否连接工控机
@Volatile
private var autopilotStatus: Int? = null //自动驾驶状态 0代表不可自动驾驶,1代表可自动驾驶,2代表自动驾驶中
private var dockerRebootDialog: DockerRebootDialog? = null

View File

@@ -27,6 +27,7 @@ class SpeedPanelView @JvmOverloads constructor(
var mContext: Context
var mSpeedChartView: SpeedChartView
@Volatile
var mLatLng: MogoLocation? = null
init {

View File

@@ -14,6 +14,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.BarUtils
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import kotlinx.android.synthetic.main.view_status_bar.view.*
import java.util.concurrent.CopyOnWriteArrayList
@@ -55,9 +56,11 @@ class StatusBarView @JvmOverloads constructor(
}
override fun onSkinModeChange(skinMode: Int) {
when (skinMode) {
0 -> setStatusBarDarkOrLight(false)
1 -> setStatusBarDarkOrLight(true)
ThreadUtils.runOnUiThread {
when (skinMode) {
0 -> setStatusBarDarkOrLight(false)
1 -> setStatusBarDarkOrLight(true)
}
}
}

View File

@@ -31,6 +31,7 @@ class VersionNameView @JvmOverloads constructor(
const val TAG = "VersionNameView"
}
@Volatile
private var dockerVersion: String? = null //工控机版本
init{

View File

@@ -293,11 +293,13 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
}
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
val status = autoPilotStatusInfo.ipcConnStatus
if (mLastStatus != status) {
val statusInfo = autoPilotStatusInfo.clone()
rvConnectInfo.post { updateConnectInfoView(statusInfo) }
mLastStatus = status
UiThreadHandler.post {
val status = autoPilotStatusInfo.ipcConnStatus
if (mLastStatus != status) {
val statusInfo = autoPilotStatusInfo.clone()
rvConnectInfo.post { updateConnectInfoView(statusInfo) }
mLastStatus = status
}
}
}

View File

@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.main;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_HMI;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Process;
@@ -18,20 +17,15 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths;
import com.mogo.eagle.core.function.api.chat.biz.ChatConsts;
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager;
import com.mogo.eagle.core.function.msgbox.db.MsgBoxDb;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.ProcessUtils;
import com.mogo.eagle.core.utilcode.util.SPUtils;
import java.io.File;
import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* 默认初始化一些基础服务配置 todo 分离 msgBox去自己的模块中 --- 扶风
* 默认初始化一些基础服务配置
*/
public abstract class MainMoGoApplication extends AbsMogoApplication {
@@ -50,12 +44,8 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
initLogConfig();
initTipToast();
initModules();
if (ProcessUtils.isMainProcess(this)) {
clearMessageBoxTable();
CallerMsgBoxManager.INSTANCE.queryAllMessages(this);
}
CallerMsgBoxManager.INSTANCE.queryAllMessages(this);
CallerDevaToolsManager.INSTANCE.updateUpgradeProgress();
CallerDevaToolsManager.INSTANCE.updateObuUpgradeStatus();
}
@Override
@@ -64,38 +54,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
return true;
}
@SuppressLint("SimpleDateFormat")
private void clearMessageBoxTable() {
new Thread(() -> {
String lastLaunchTimeStr = SPUtils.getInstance().getString("last_launch", "");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Date currDate = new Date(System.currentTimeMillis());
String currTimeStr = format.format(currDate);
try {
if (lastLaunchTimeStr != null && !lastLaunchTimeStr.isEmpty()) {
boolean isSameDay = currTimeStr.equals(lastLaunchTimeStr);
// 超过一天需要清除消息盒子中的数据并把时间戳存入SP
if (!isSameDay) {
File file = this.getDatabasePath(MsgBoxDb.INTERNAL_DB_NAME);
if (file != null && file.exists()) {
this.deleteDatabase(MsgBoxDb.INTERNAL_DB_NAME);
}
SPUtils.getInstance().put("last_launch", currTimeStr);
}
} else {
// 首次使用App或中途仅删除sp文件
File file = this.getDatabasePath(MsgBoxDb.INTERNAL_DB_NAME);
if (file != null && file.exists()) {
this.deleteDatabase(MsgBoxDb.INTERNAL_DB_NAME);
}
SPUtils.getInstance().put("last_launch", currTimeStr);
}
} catch (Exception e) {
CallerLogger.INSTANCE.e(TAG, e.getMessage());
}
}).start();
}
/**
* 初始化异常采集配置
*/
@@ -126,11 +84,11 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_V2X_OBU_MOGO, "IMoGoObuProvider"));
// BIZ
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_FUNC_BIZ, "IMoGoNoticeProvider"));
// todo 后置 车聊聊IM
// 后置 车聊聊IM
MogoModulePaths.addModuleFunctionServer(new MogoModule(ChatConsts.CHAT_PROVIDER_PATH, ChatConsts.CHAT_MODULE_NAME));
// 司机身份专属
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
// todo 后置 地图数据收集模块
// 后置 地图数据收集模块
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_MAP_DATA_COLLECT_PROVIDER, "MoGoMapDataCollector"));
}
CallerLogger.INSTANCE.i(M_HMI + TAG, "App launch timer cost " + (System.currentTimeMillis() - start) + "ms");
@@ -141,7 +99,7 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
super.attachBaseContext(base);
/*如果是主进程**/
// if (ProcessUtils.isMainProcess(this)) {
AppLaunchTimeUtils.beginTimeCalculate(AppLaunchTimeUtils.COLD_START);
AppLaunchTimeUtils.beginTimeCalculate(AppLaunchTimeUtils.COLD_START);
// }
BoostMultiDex.install(base);
AbsMogoApplication.sApp = this;

View File

@@ -11,19 +11,19 @@ import com.mogo.eagle.core.widget.TextureVideoView
*/
class VideoAdAtc : AppCompatActivity() {
private lateinit var svpFrame: TextureVideoView
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_video_ad_atc)
svpFrame = findViewById(R.id.svp_frame)
val url = "android.resource://" + packageName + "/" + R.raw.mogo_ad
svpFrame.videoPath = url
svpFrame.start()
BarUtils.hideStatusBarAndSticky(this.window)
}
// private lateinit var svpFrame: TextureVideoView
//
// override fun onCreate(savedInstanceState: Bundle?) {
// super.onCreate(savedInstanceState)
// setContentView(R.layout.activity_video_ad_atc)
//
// svpFrame = findViewById(R.id.svp_frame)
//
// val url = "android.resource://" + packageName + "/" + R.raw.mogo_ad
// svpFrame.videoPath = url
// svpFrame.start()
//
// BarUtils.hideStatusBarAndSticky(this.window)
// }
}

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="450dp"
android:layout_height="110dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#FFFFFFFF"
app:roundLayoutRadius="@dimen/dp_18"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10">
<ImageView
android:id="@+id/ivMOperationImage"
android:layout_width="@dimen/dp_83"
android:layout_height="@dimen/dp_83"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginStart="@dimen/dp_13"
android:src="@drawable/icon_msg_box_operation_stop"
/>
<TextView
android:id="@+id/tvMOperationTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:textColor="#99203555"
android:textSize="18dp"
android:layout_marginEnd="@dimen/dp_20"
/>
<TextView
android:id="@+id/tvMOperationContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivMOperationImage"
app:layout_constraintRight_toLeftOf="@id/tvMOperationTime"
android:gravity="start"
android:textColor="#FF203555"
android:textSize="20dp"
android:layout_marginStart="@dimen/dp_13"
android:layout_marginEnd="@dimen/dp_13"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_100"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
android:id="@+id/ivMOperationImage"
android:layout_width="@dimen/dp_68"
android:layout_height="@dimen/dp_68"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginStart="@dimen/dp_16"
android:src="@drawable/icon_msg_box_operation_stop"
/>
<TextView
android:id="@+id/tvMOperationTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:textColor="#FF4A5B76"
android:textSize="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_10"
/>
<TextView
android:id="@+id/tvMOperationContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivMOperationImage"
app:layout_constraintRight_toLeftOf="@id/tvMOperationTime"
android:gravity="start"
android:textColor="#FF203555"
android:textSize="@dimen/dp_20"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_16"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -206,6 +206,29 @@
android:layout_height="1dp"
android:background="#F0F0F0" />
<TextView
android:id="@+id/tvCmdbCarInfo"
style="@style/DebugSettingText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="车辆信息: " />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0" />
<TextView
android:id="@+id/tvCmdbCarInfoContent"
style="@style/DebugSettingText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minLines="5" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0" />
<ToggleButton
android:id="@+id/tbIsDemoMode"
android:layout_width="match_parent"
@@ -242,18 +265,6 @@
android:textOn="关闭感知优化模式"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbV2NFromCar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:padding="@dimen/dp_20"
android:background="@drawable/radio_button_normal_background_right"
android:textColor="#000"
android:textOff="开启车端V2N预警"
android:textOn="关闭车端V2N预警"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbDrawAiCloudFusion"
android:layout_width="match_parent"
@@ -298,21 +309,22 @@
android:background="@drawable/radio_button_normal_background_right"
android:drawableEnd="@drawable/icon_right"
android:padding="@dimen/dp_20"
android:textOff="魔戒控制"
android:textOn="魔戒控制"
android:textOff="蘑方控制"
android:textOn="蘑方控制"
android:textSize="@dimen/dp_24" />
<Button
android:id="@+id/btnOpenAllGestures"
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/tbOpenMfView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="@dimen/dp_20"
android:text="开启手势滑动"
android:textSize="@dimen/dp_24"
android:text="打开蘑方按键Toast"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
android:layout_marginLeft="10dp"
android:scaleY="1"
android:scaleX="1"
/>
<Button
android:id="@+id/btnIpcReboot"

View File

@@ -163,11 +163,13 @@
app:layout_constraintRight_toRightOf="parent"
/>
<!--这个后面产品会统一去掉-->
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/tbObuToDcView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OBU到工控机V2I显示"
android:visibility="gone"
android:paddingTop="25dp"
android:paddingBottom="25dp"
android:scaleY="1.2"
@@ -200,7 +202,7 @@
android:paddingBottom="25dp"
android:scaleY="1.2"
android:scaleX="1.2"
app:layout_constraintTop_toBottomOf="@id/tbObuToDcView"
app:layout_constraintTop_toBottomOf="@id/tbObuV2vView"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/verticalGuideLine"
/>
@@ -214,23 +216,9 @@
android:paddingBottom="25dp"
android:scaleY="1.2"
android:scaleX="1.2"
app:layout_constraintTop_toBottomOf="@id/tbObuToDcView"
app:layout_constraintLeft_toRightOf="@id/verticalGuideLine"
app:layout_constraintRight_toRightOf="parent"
/>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/tbRoadLimitSpeedSop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="路侧限速提醒"
android:paddingTop="25dp"
android:paddingBottom="25dp"
android:scaleY="1.2"
android:scaleX="1.2"
app:layout_constraintTop_toBottomOf="@id/tbCloudWeaknessTrafficSop"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/tbObuWeaknessTrafficSop"
app:layout_constraintRight_toLeftOf="@id/verticalGuideLine"
app:layout_constraintLeft_toLeftOf="parent"
/>
<TextView
@@ -238,7 +226,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/tbRoadLimitSpeedSop"
app:layout_constraintTop_toBottomOf="@id/tbIPCReport"
android:text="变道速度阈值:"
android:textSize="@dimen/dp_36"
android:textColor="#1A1A1A"