Merge branch 'dev_robotaxi-d_230412_2.15.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_230412_2.15.0
This commit is contained in:
@@ -15,7 +15,10 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.widget.RoundConstraintLayout
|
||||
import kotlinx.android.synthetic.main.view_driver_monitor.view.*
|
||||
import kotlinx.android.synthetic.main.view_driver_monitor.view.ivNormal
|
||||
import kotlinx.android.synthetic.main.view_driver_monitor.view.liveProgressBar
|
||||
import kotlinx.android.synthetic.main.view_driver_monitor.view.textureViewDriverMonitor
|
||||
import kotlinx.android.synthetic.main.view_driver_monitor.view.tvLoadingHit
|
||||
|
||||
/**
|
||||
* 乘客端查看当前车辆驾驶舱的司机监控View
|
||||
@@ -56,6 +59,8 @@ class DriverMonitorView :
|
||||
)
|
||||
}
|
||||
|
||||
var liveListener: LiveListener? = null
|
||||
|
||||
constructor(context: Context?) : super(context) {
|
||||
initView(context)
|
||||
}
|
||||
@@ -110,26 +115,41 @@ class DriverMonitorView :
|
||||
|
||||
fun showLive() {
|
||||
if (!isLived) {
|
||||
// sopShowDriverMap[CallerTelematicManager.getServerToken()]?.let {
|
||||
// Logger.d(
|
||||
// "${SceneConstant.M_HMI}$TAG",
|
||||
// "检查司机直播……isLived=$isLived 当前车上的司机端SN=${sopShowDriverMap[CallerTelematicManager.getServerToken()]}"
|
||||
// )
|
||||
// CallerLogger.d(
|
||||
// "${SceneConstant.M_HMI}$TAG",
|
||||
// "检查司机直播……isLived=$isLived 当前车上的司机端SN=${sopShowDriverMap[CallerTelematicManager.getServerToken()]}"
|
||||
// )
|
||||
// MoGoAiCloudTrafficLive.viewDesignativeVehicleLive(
|
||||
// it,
|
||||
// textureViewDriverMonitor,
|
||||
// carLiveCallBack
|
||||
// )
|
||||
// }
|
||||
MoGoAiCloudTrafficLive.viewDesignativeVehicleLive(
|
||||
"F803EB2046PZD00164",
|
||||
textureViewDriverMonitor,
|
||||
carLiveCallBack
|
||||
)
|
||||
sopShowDriverMap[CallerTelematicManager.getServerToken()]?.let {
|
||||
Logger.d(
|
||||
"${SceneConstant.M_HMI}$TAG",
|
||||
"检查司机直播……isLived=$isLived 当前车上的司机端SN=${sopShowDriverMap[CallerTelematicManager.getServerToken()]}"
|
||||
)
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_HMI}$TAG",
|
||||
"检查司机直播……isLived=$isLived 当前车上的司机端SN=${sopShowDriverMap[CallerTelematicManager.getServerToken()]}"
|
||||
)
|
||||
MoGoAiCloudTrafficLive.viewDesignativeVehicleLive(
|
||||
it,
|
||||
textureViewDriverMonitor,
|
||||
carLiveCallBack
|
||||
)
|
||||
} ?: let {
|
||||
//为空又怎么撸
|
||||
if (CallerTelematicManager.getServerToken().isNotEmpty()) {
|
||||
Logger.d(
|
||||
"${SceneConstant.M_HMI}$TAG",
|
||||
"检查司机直播……isLived=$isLived 当前车辆SN=${CallerTelematicManager.getServerToken()} 不支持直播"
|
||||
)
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_HMI}$TAG",
|
||||
"检查司机直播……isLived=$isLived 当前车辆SN=${CallerTelematicManager.getServerToken()} 不支持直播"
|
||||
)
|
||||
// 乘客屏幕连接上了司机屏,但是司机屏不在直播范围内,进行隐藏操作。
|
||||
liveListener?.onPlayError()
|
||||
}
|
||||
}
|
||||
// TODO 测试用的
|
||||
// MoGoAiCloudTrafficLive.viewDesignativeVehicleLive(
|
||||
// "F803EB2046PZD00164",
|
||||
// textureViewDriverMonitor,
|
||||
// carLiveCallBack
|
||||
// )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,4 +205,8 @@ class DriverMonitorView :
|
||||
}
|
||||
}
|
||||
|
||||
interface LiveListener {
|
||||
fun onPlayError()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -52,10 +52,11 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
|
||||
private var context: Context? = null
|
||||
|
||||
@Volatile
|
||||
private var gotToken = false
|
||||
|
||||
private var httpDnsSimpleLocation by Delegates.observable(getDefaultSimpleLocation()) { _, oldValue, newValue ->
|
||||
if (oldValue.cityCode != newValue.cityCode) {
|
||||
if (gotToken && oldValue.cityCode != newValue.cityCode) {
|
||||
reConnectSocket(oldValue.cityCode, newValue.cityCode)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user