Merge branch 'dev_arch_opt_3.0' into 'dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0'

Dev arch opt 3.0

See merge request zhjt/AndroidApp/MoGoEagleEye!692
This commit is contained in:
wangmingjun
2023-03-15 14:31:26 +00:00
13 changed files with 256 additions and 185 deletions

View File

@@ -109,7 +109,6 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
override fun onCurrentVersion(version: MogoObuSystemBConfigData) {
CallerLogger.d("$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}", "onCurrentVersion version = ${version.version}")
if (!version.version.isNullOrEmpty()) {
CallerObuInfoListenerManager.invokeObuVersionName(version.version)
CallerDevaToolsManager.queryObuUpgrade(version.version)
}
}
@@ -200,7 +199,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* @param data 系统状态
*/
override fun onObuSystemStatus(data: MogoObuSystemStatusData?) {
CallerObuInfoListenerManager.invokeGetObuInfo(data.toString())
}
/**

View File

@@ -152,8 +152,7 @@ internal class DebugSettingView @JvmOverloads constructor(
//OBU连接状态
private var obuConnectStatus: Boolean = false
private var mObuVersionName: String = ""
private var mObuDeviceId: String = ""
private var mObuInfoStr: String = ""
//渠道包标签
private var onlineSelected: Boolean = true
@@ -574,7 +573,7 @@ internal class DebugSettingView @JvmOverloads constructor(
setLogCheckedChangeListener()
//OBU配置信息
tvObuInfo.text = CallerObuConnectListenerManager.getObuStatusInfoJsonString()
// tvObuInfo.text = CallerObuConnectListenerManager.getObuStatusInfoJsonString()
//工控机配置信息
tvAutopilotInfo.text =
@@ -1537,7 +1536,6 @@ internal class DebugSettingView @JvmOverloads constructor(
}"
)
tvServerSocketStatus.text = Html.fromHtml(
"服务器Socket状态${
if (MogoStatusManager.getInstance().isSocketOnLine) {
@@ -1645,10 +1643,8 @@ internal class DebugSettingView @JvmOverloads constructor(
tbIsDemoMode.text = "开启美化模式"
}
//obu TODO 后面会添加很多os那边需要显示的内容
obuVersionNameTv.text = Html.fromHtml(
"OBU版本号$mObuVersionName"
)
//obu信息排查obu相关问题使用
tvObuInfoContent.text = mObuInfoStr
obuConnectStatusTv.text = Html.fromHtml(
"OBU连接状态${
@@ -1667,7 +1663,7 @@ internal class DebugSettingView @JvmOverloads constructor(
*/
override fun onConnectStatus(obuStatusInfo: ObuStatusInfo) {
lifecycleOwner.lifecycleScope.launch {
tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
// tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
AppConfigInfo.obuSdkVersion = obuStatusInfo.obuSdkVersion
AppConfigInfo.isConnectObu = obuStatusInfo.obuStatus
@@ -2058,12 +2054,7 @@ internal class DebugSettingView @JvmOverloads constructor(
setLogCheckedChangeListener()
}
override fun onGetObuVersionName(obuVersionName: String) {
mObuVersionName = obuVersionName
override fun onGetObuInfo(obuInfoStr: String) {
mObuInfoStr = obuInfoStr
}
override fun onObuDeviceId(obuDeviceId: String) {
mObuDeviceId = obuDeviceId
}
}

View File

@@ -1086,16 +1086,16 @@
android:background="#F0F0F0"
app:layout_constraintTop_toBottomOf="@id/btnSetObuIP" />
<TextView
android:id="@+id/tvObuInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_5"
android:minLines="4"
android:text="OBU配置信息"
android:textColor="#000"
android:textSize="@dimen/dp_24"
app:layout_constraintTop_toBottomOf="@id/obuDivider" />
<!-- <TextView-->
<!-- android:id="@+id/tvObuInfo"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_margin="@dimen/dp_5"-->
<!-- android:minLines="3"-->
<!-- android:text="OBU配置信息"-->
<!-- android:textColor="#000"-->
<!-- android:textSize="@dimen/dp_24"-->
<!-- app:layout_constraintTop_toBottomOf="@id/obuDivider" />-->
<LinearLayout
android:id="@+id/obuStatusCenterLayout"
@@ -1104,31 +1104,33 @@
android:orientation="vertical"
android:visibility="visible"
tools:visibility="visible"
app:layout_constraintTop_toBottomOf="@id/tvObuInfo"
app:layout_constraintTop_toBottomOf="@id/obuDivider"
tools:ignore="MissingConstraints">
<TextView
android:id="@+id/obuVersionNameTv"
style="@style/DebugSettingText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0" />
<TextView
android:id="@+id/obuConnectStatusTv"
style="@style/DebugSettingText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0" />
<TextView
android:id="@+id/obuConnectStatusTv"
style="@style/DebugSettingText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0" />
<TextView
android:id="@+id/obuVersionNameTv"
style="@style/DebugSettingText"
android:text="OBU信息"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0" />
<TextView
android:id="@+id/tvObuInfoContent"
style="@style/DebugSettingText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minLines="3" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -125,7 +125,7 @@ public class TrackManager {
cellIdCaches.forcePut(uuid, trackObj.getCellIdPos());
mMarkersCaches.put(uuid, trackObj);
trafficDataUuid.add(uuid);
Log.i("costTime","" + (System.currentTimeMillis() - cost));
//Log.i("costTime","" + (System.currentTimeMillis() - cost));
}
return mFilterTrafficData;
}

View File

@@ -9,14 +9,8 @@ package com.mogo.eagle.core.function.api.datacenter.obu
interface IMoGoObuInfoListener {
/**
* @param obuVersionName OBU硬件版本
* @param obuInfoStr OBU信息
*/
fun onGetObuVersionName(obuVersionName: String)
/**
* obuDeviceId
*/
fun onObuDeviceId(obuDeviceId: String)
fun onGetObuInfo(obuInfoStr: String)
}

View File

@@ -9,25 +9,12 @@ import com.mogo.eagle.core.function.call.base.CallerBase
*/
object CallerObuInfoListenerManager : CallerBase<IMoGoObuInfoListener>() {
fun invokeObuVersionName(obuVersionName: String) {
fun invokeGetObuInfo(obuInfoStr: String) {
M_LISTENERS.forEach {
val listener = it.value
listener.onGetObuVersionName(obuVersionName)
listener.onGetObuInfo(obuInfoStr)
}
}
fun invokeObuDeviceId(obuDeviceId: String) {
M_LISTENERS.forEach {
val listener = it.value
listener.onObuDeviceId(obuDeviceId)
}
}
// fun invokeQueryContainersResponse(dockerList: List<String>) {
// M_LISTENERS.forEach {
// val listener = it.value
// //TODO
// }
// }
}