[672][app][device]升级build gradle版本到3.5.4用于兼容Android11 manifest <queries>标签;添加硬件管理模块用于管理车载已硬件:新老核销、语音模块等;OCH核销依赖下沉;
This commit is contained in:
@@ -19,6 +19,7 @@ import android.view.ViewGroup
|
||||
import android.widget.BaseAdapter
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.widget.ListPopupWindow
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -132,6 +133,8 @@ import com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_CROSS
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_TOP
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.MODE_LONG_SIGHT
|
||||
import com.mogo.tts.base.IMogoTTSCallback
|
||||
import com.mogo.support.device.DevicesManager
|
||||
import com.mogo.support.device.IBindStateChangeListener
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.appVersionInfoLayout
|
||||
@@ -272,6 +275,7 @@ import kotlinx.android.synthetic.main.view_debug_setting.view.tvDriverServerStar
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvGearInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvGitBranchInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvHDCityCode
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvHardwareDeviceBindState
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIPCMac
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIdentifyInfo
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.tvIdentifyInfoCopy
|
||||
@@ -351,7 +355,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
IMoGoChassisStatesListener,
|
||||
IMoGoSweeperFutianCleanSystemListener,
|
||||
IMoGoObuInfoListener,
|
||||
ISopSettingListener, IViewControlListener, IMoGoCloudListener {
|
||||
ISopSettingListener, IViewControlListener, IMoGoCloudListener, IBindStateChangeListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "DebugSettingView"
|
||||
@@ -474,6 +478,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
CallerObuInfoListenerManager.addListener(TAG, this)
|
||||
DevicesManager.addBindStateChangeListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
@@ -503,7 +508,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
CallerSopSettingManager.removeListener(TAG)
|
||||
|
||||
CallerHmiViewControlListenerManager.removeListener(TAG)
|
||||
|
||||
DevicesManager.removeBindStateChangeListener(TAG)
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(
|
||||
FuncBizConfig.FOUNDATION,
|
||||
@@ -1323,6 +1328,40 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
CallerHmiManager.toggleHdMapVisualAngleAdjust(isChecked)
|
||||
}
|
||||
|
||||
//硬件服务绑定状态以及版本
|
||||
tvHardwareDeviceBindState.setOnClickListener {
|
||||
val state = when (DevicesManager.getServiceBindState()) {
|
||||
0 -> {
|
||||
"绑定成功"
|
||||
}
|
||||
|
||||
1 -> {
|
||||
"绑定失败:未安装“硬件服务”APP"
|
||||
}
|
||||
|
||||
2 -> {
|
||||
"绑定失败:没有绑定权限或找不到服务"
|
||||
}
|
||||
|
||||
3 -> {
|
||||
"服务被异常销毁"
|
||||
}
|
||||
|
||||
else -> {
|
||||
"未知"
|
||||
}
|
||||
}
|
||||
var msg = "客户端SDK版本:${DevicesManager.getSDKVersion() ?: "未知"}\n"
|
||||
msg += "客户端SDK AIDL版本:${DevicesManager.getSDKAIDLVersion() ?: "未知"}\n"
|
||||
msg += "硬件服务端APP版本:${DevicesManager.getServerVersion() ?: "未知"}\n"
|
||||
msg += "硬件服务端APP AIDL版本:${DevicesManager.getServerAIDLVersion() ?: ""}"
|
||||
AlertDialog.Builder(context)
|
||||
.setTitle("硬件服务绑定状态: $state")
|
||||
.setMessage(msg)
|
||||
.setPositiveButton("确定", null)
|
||||
.create().show()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2707,4 +2746,31 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
private fun invokeCronetResult(json: String) {
|
||||
CallerLogger.d(SceneConstant.M_HMI + "CronetNetwork", json)
|
||||
}
|
||||
|
||||
override fun onServiceState(state: Int) {
|
||||
val stateMsg = when (state) {
|
||||
0 -> {
|
||||
"绑定成功"
|
||||
}
|
||||
|
||||
1 -> {
|
||||
"绑定失败:未安装“硬件服务”APP"
|
||||
}
|
||||
|
||||
2 -> {
|
||||
"绑定失败:没有绑定权限或找不到服务"
|
||||
}
|
||||
|
||||
3 -> {
|
||||
"服务被异常销毁"
|
||||
}
|
||||
|
||||
else -> {
|
||||
"未知"
|
||||
}
|
||||
}
|
||||
UiThreadHandler.post {
|
||||
tvHardwareDeviceBindState.text = "硬件服务绑定状态: $stateMsg"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -681,6 +681,23 @@
|
||||
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/tvHardwareDeviceBindState"
|
||||
style="@style/DebugSettingText"
|
||||
android:text="硬件服务绑定状态: 未知"
|
||||
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/tvBackgroundOperation"
|
||||
style="@style/DebugSettingText"
|
||||
|
||||
Reference in New Issue
Block a user