Merge branch 'dev_arch_opt_3.0' into 'dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0'
Dev arch opt 3.0 See merge request zhjt/AndroidApp/MoGoEagleEye!625
This commit is contained in:
@@ -39,6 +39,7 @@ import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView
|
||||
import com.mogo.eagle.core.utilcode.kotlin.safeCancel
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
@@ -87,6 +88,8 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
||||
)
|
||||
}
|
||||
|
||||
private val ttsMap = mutableMapOf<String, Long>()
|
||||
|
||||
/**
|
||||
* 不展示顶部弹窗,其它保留
|
||||
*/
|
||||
@@ -99,6 +102,19 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
||||
direction: WarningDirectionEnum,
|
||||
expireTime: Long
|
||||
) {
|
||||
//30秒内同一个事件只出现一次 TODO 临时添加,后面宏宇统一在数据中心处理
|
||||
if (ttsMap.containsKey(v2xType)) {
|
||||
var oldTime = ttsMap[v2xType]
|
||||
var timeDiff = (System.currentTimeMillis() - oldTime!!) / 1000
|
||||
if (timeDiff < 30) {
|
||||
return
|
||||
}
|
||||
ttsMap.remove(v2xType)
|
||||
ttsMap[v2xType] = System.currentTimeMillis()
|
||||
} else {
|
||||
ttsMap[v2xType] = System.currentTimeMillis()
|
||||
}
|
||||
CallerLogger.d("${SceneConstant.M_OBU}${TAG}", "warningV2X v2xType = $v2xType ---alertContent = $alertContent ---ttsContent = $ttsContent ")
|
||||
val playTTS = !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
|
||||
context?.let {
|
||||
val warningContent = alertContent ?: EventTypeEnumNew.getWarningContent(v2xType)
|
||||
|
||||
@@ -33,6 +33,8 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
private var data: ArrayList<MsgBoxBean> ?= null
|
||||
|
||||
private val operation: Int = 1
|
||||
private val operationReturn: Int = 10
|
||||
private val operationStop: Int = 11
|
||||
private val notice: Int = 2
|
||||
private val v2x: Int = 3
|
||||
private val report: Int = 4
|
||||
@@ -55,6 +57,16 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_operation,parent,false)
|
||||
return BubbleOperationHolder(view)
|
||||
}
|
||||
operationReturn -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_bubble_operation_return, parent, false)
|
||||
return BubbleOperationReturnHolder(view)
|
||||
}
|
||||
operationStop -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_bubble_operation_stop, parent, false)
|
||||
return BubbleOperationStopHolder(view)
|
||||
}
|
||||
report -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_report,parent,false)
|
||||
return BubbleReportHolder(view)
|
||||
@@ -87,6 +99,23 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
}
|
||||
}
|
||||
}
|
||||
//运营平台还车通知
|
||||
is BubbleOperationReturnHolder -> {
|
||||
data?.let {
|
||||
val operationReturnMsg = it[position].bean as OperationMsg
|
||||
holder.tvOperationReturnContent.text = operationReturnMsg.content
|
||||
holder.tvOperationReturnTime.text =
|
||||
TimeUtils.millis2String(operationReturnMsg.timestamp, getHourMinFormat())
|
||||
}
|
||||
}
|
||||
//运营平台靠边停车
|
||||
is BubbleOperationStopHolder -> {
|
||||
data?.let {
|
||||
val operationStopMsg = it[position].bean as OperationMsg
|
||||
holder.tvOperationStopTime.text =
|
||||
TimeUtils.millis2String(operationStopMsg.timestamp, getHourMinFormat())
|
||||
}
|
||||
}
|
||||
is BubbleReportHolder -> {
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
@@ -187,7 +216,16 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
return if(data!![position].type == MsgBoxType.OPERATION){
|
||||
operation
|
||||
if((data!![position].bean as OperationMsg).type == 0){
|
||||
//运营平台还车通知
|
||||
operationReturn
|
||||
}else if((data!![position].bean as OperationMsg).type == 1){
|
||||
//运营平台靠边停车
|
||||
operationStop
|
||||
}else{
|
||||
//普通运营平台
|
||||
operation
|
||||
}
|
||||
}else if(data!![position].type == MsgBoxType.REPORT){
|
||||
report
|
||||
}else if(data!![position].type == MsgBoxType.NOTICE){
|
||||
@@ -214,6 +252,17 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
var clBubbleOperationLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clBubbleOperationLayout)
|
||||
}
|
||||
|
||||
//运营平台还车通知
|
||||
class BubbleOperationReturnHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvOperationReturnTime: TextView = itemView.findViewById(R.id.tvOperationReturnTime)
|
||||
var tvOperationReturnContent: TextView = itemView.findViewById(R.id.tvOperationReturnContent)
|
||||
}
|
||||
|
||||
//运营平台靠边停车通知
|
||||
class BubbleOperationStopHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvOperationStopTime: TextView = itemView.findViewById(R.id.tvOperationStopTime)
|
||||
}
|
||||
|
||||
//Notice
|
||||
class BubbleNoticeHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivNoticeImage: ImageView = itemView.findViewById(R.id.ivNoticeImage)
|
||||
|
||||
@@ -35,6 +35,8 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
private var reportBean: MsgBoxBean ?= null
|
||||
|
||||
private val operation: Int = 1
|
||||
private val operationReturn: Int = 10
|
||||
private val operationStop: Int = 11
|
||||
private val notice: Int = 2
|
||||
private val v2x: Int = 3
|
||||
private val report: Int = 5
|
||||
@@ -72,6 +74,16 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
.inflate(R.layout.item_msg_box_operation, parent, false)
|
||||
return MsgBoxOperation(view)
|
||||
}
|
||||
operationReturn -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_operation_return, parent, false)
|
||||
return MsgBoxOperationReturn(view)
|
||||
}
|
||||
operationStop -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_operation_stop, parent, false)
|
||||
return MsgBoxOperationStop(view)
|
||||
}
|
||||
notice -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_notice, parent, false)
|
||||
@@ -244,6 +256,23 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
}
|
||||
}
|
||||
}
|
||||
//运营平台还车通知
|
||||
is MsgBoxOperationReturn -> {
|
||||
data?.let {
|
||||
val operationReturnMsg = it[position].bean as OperationMsg
|
||||
holder.tvOperationReturnContent.text = operationReturnMsg.content
|
||||
holder.tvOperationReturnTime.text =
|
||||
TimeUtils.millis2String(operationReturnMsg.timestamp, getHourMinFormat())
|
||||
}
|
||||
}
|
||||
//运营平台靠边停车
|
||||
is MsgBoxOperationStop -> {
|
||||
data?.let {
|
||||
val operationStopMsg = it[position].bean as OperationMsg
|
||||
holder.tvOperationStopTime.text =
|
||||
TimeUtils.millis2String(operationStopMsg.timestamp, getHourMinFormat())
|
||||
}
|
||||
}
|
||||
is MsgBoxNotice -> {
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
@@ -314,7 +343,16 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
return if (data!![position].type == MsgBoxType.OPERATION) {
|
||||
operation
|
||||
if((data!![position].bean as OperationMsg).type == 0){
|
||||
//运营平台还车通知
|
||||
operationReturn
|
||||
}else if((data!![position].bean as OperationMsg).type == 1){
|
||||
//运营平台靠边停车
|
||||
operationStop
|
||||
}else{
|
||||
//普通运营平台
|
||||
operation
|
||||
}
|
||||
} else if (data!![position].type == MsgBoxType.NOTICE) {
|
||||
notice
|
||||
} else if (data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY) {
|
||||
@@ -365,6 +403,17 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
var tvOperationContentOpen: TextView = itemView.findViewById(R.id.tvOperationContentOpen)
|
||||
}
|
||||
|
||||
//运营平台还车通知
|
||||
class MsgBoxOperationReturn(itemView: View) : RecyclerView.ViewHolder(itemView){
|
||||
var tvOperationReturnTime: TextView = itemView.findViewById(R.id.tvOperationReturnTime)
|
||||
var tvOperationReturnContent: TextView = itemView.findViewById(R.id.tvOperationReturnContent)
|
||||
}
|
||||
|
||||
//运营平台靠边停车通知
|
||||
class MsgBoxOperationStop(itemView: View) : RecyclerView.ViewHolder(itemView){
|
||||
var tvOperationStopTime: TextView = itemView.findViewById(R.id.tvOperationStopTime)
|
||||
}
|
||||
|
||||
//Notice
|
||||
class MsgBoxNotice(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var ivNoticeImage: ImageView = itemView.findViewById(R.id.ivNoticeImage)
|
||||
|
||||
@@ -55,7 +55,8 @@ class ToolsView private constructor() {
|
||||
}
|
||||
|
||||
override fun showBadCaseManagerView() {
|
||||
ToastUtils.showShort("代码合并中")
|
||||
dismissToolsFloatView()
|
||||
CallerDevaToolsManager.showBadCaseManagerView(it)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -42,10 +42,10 @@ class LimitingVelocityView constructor(
|
||||
if (limitingVelocity > 0) {
|
||||
visibility = View.VISIBLE
|
||||
tvLimitingVelocity.text = "$limitingVelocity"
|
||||
tvLimitingSource.text = DataSourceType.getName(sourceType)
|
||||
tvLimitingSource?.text = DataSourceType.getName(sourceType)
|
||||
} else {
|
||||
visibility = View.GONE
|
||||
tvLimitingSource.text = ""
|
||||
tvLimitingSource?.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,64 @@
|
||||
<?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="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivOperationReturnImage"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/icon_msg_box_operation_return"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationReturnTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="还车通知"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintTop_toTopOf="@id/ivOperationReturnImage"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivOperationReturnImage"
|
||||
android:layout_marginStart="23dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationReturnTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/ivOperationReturnImage"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationReturnContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvOperationReturnTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvOperationReturnTime"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivOperationReturnImage"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28dp"
|
||||
android:gravity="start"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?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="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivOperationStopImage"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/icon_msg_box_operation_stop"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationStopTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivOperationStopImage"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationStopContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivOperationStopImage"
|
||||
app:layout_constraintRight_toRightOf="@id/tvOperationStopTime"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:text="靠边停车"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/clV2XLayout"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivOperationReturnImage"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/icon_msg_box_operation_return"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationReturnTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="还车通知"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintTop_toTopOf="@id/ivOperationReturnImage"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivOperationReturnImage"
|
||||
android:layout_marginStart="23dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationReturnTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/ivOperationReturnImage"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationReturnContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvOperationReturnTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvOperationReturnTime"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivOperationReturnImage"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28dp"
|
||||
android:gravity="start"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivOperationStopImage"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/icon_msg_box_operation_stop"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationStopTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivOperationStopImage"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationStopContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivOperationStopImage"
|
||||
app:layout_constraintRight_toRightOf="@id/tvOperationStopTime"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:text="靠边停车"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user