[6.6.0] find bug of pb to json
This commit is contained in:
@@ -10,7 +10,6 @@ import com.mogo.cloud.trafficlive.api.MoGoAiCloudTrafficLive
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
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.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.widget.RoundConstraintLayout
|
||||
@@ -116,10 +115,6 @@ class DriverMonitorView :
|
||||
currentDriverLiveSN = ""
|
||||
}
|
||||
|
||||
Logger.d(
|
||||
"${SceneConstant.M_HMI}$TAG",
|
||||
"当前车上的司机端SN=${currentDriverSN},直播分体机SN=${currentDriverLiveSN}"
|
||||
)
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_HMI}$TAG",
|
||||
"当前车上的司机端SN=${currentDriverSN},直播分体机SN=${currentDriverLiveSN}"
|
||||
@@ -133,10 +128,6 @@ class DriverMonitorView :
|
||||
*/
|
||||
fun startLive() {
|
||||
if (currentDriverLiveSN.isNotEmpty()) {
|
||||
Logger.d(
|
||||
"${SceneConstant.M_HMI}$TAG",
|
||||
"检查司机直播……isLived=$isLived 当前车上的司机端SN=${currentDriverSN},直播分体机SN=${currentDriverLiveSN}"
|
||||
)
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_HMI}$TAG",
|
||||
"检查司机直播……isLived=$isLived 当前车上的司机端SN=${currentDriverSN},直播分体机SN=${currentDriverLiveSN}"
|
||||
@@ -153,10 +144,6 @@ class DriverMonitorView :
|
||||
} else {
|
||||
ToastUtils.showShort("当前车内没有直播源")
|
||||
//为空又怎么撸
|
||||
Logger.d(
|
||||
"${SceneConstant.M_HMI}$TAG",
|
||||
"检查司机直播……isLived=$isLived 当前车辆SN=${currentDriverSN} 不支持直播"
|
||||
)
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_HMI}$TAG",
|
||||
"检查司机直播……isLived=$isLived 当前车辆SN=${currentDriverSN} 不支持直播"
|
||||
@@ -190,40 +177,34 @@ class DriverMonitorView :
|
||||
|
||||
private val carLiveCallBack = object : ITrafficCarLiveCallBack {
|
||||
override fun onLive(liveSn: String?) {
|
||||
Logger.i("${SceneConstant.M_HMI}$TAG", "onLive:$liveSn")
|
||||
CallerLogger.d("${SceneConstant.M_HMI}$TAG", "onLive:$liveSn")
|
||||
}
|
||||
|
||||
override fun onFirstFrame() {
|
||||
Logger.i("${SceneConstant.M_HMI}$TAG", "onFirstFrame:isFirstPage")
|
||||
CallerLogger.d("${SceneConstant.M_HMI}$TAG", "onFirstFrame:isFirstPage")
|
||||
isLived = true
|
||||
refreshView(isLived)
|
||||
}
|
||||
|
||||
override fun onDisConnect() {
|
||||
Logger.w("${SceneConstant.M_HMI}$TAG", "onDisConnect")
|
||||
CallerLogger.w("${SceneConstant.M_HMI}$TAG", "onDisConnect")
|
||||
isLived = false
|
||||
refreshView(isLived)
|
||||
}
|
||||
|
||||
override fun onError(errorMsg: String?) {
|
||||
Logger.e("${SceneConstant.M_HMI}$TAG", "onError msg is:${errorMsg}")
|
||||
CallerLogger.e("${SceneConstant.M_HMI}$TAG", "onError msg is:${errorMsg}")
|
||||
isLived = false
|
||||
refreshView(isLived)
|
||||
}
|
||||
|
||||
override fun onPlaying() {
|
||||
Logger.i("${SceneConstant.M_HMI}$TAG", "onPlaying……")
|
||||
CallerLogger.i("${SceneConstant.M_HMI}$TAG", "onPlaying……")
|
||||
isLived = true
|
||||
refreshView(isLived)
|
||||
}
|
||||
|
||||
override fun onPlaRequesting() {
|
||||
Logger.w("${SceneConstant.M_HMI}$TAG", "onPlaRequesting……")
|
||||
CallerLogger.w("${SceneConstant.M_HMI}$TAG", "onPlaRequesting……")
|
||||
isLived = false
|
||||
refreshView(isLived)
|
||||
|
||||
@@ -21,13 +21,18 @@ import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.kotlin.scope
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.*
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.routeDownloadFailMark
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.routeDownloadStatus
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.routeDownloadStatusRoot
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.status_container
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.viewProgressTv
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.viewStatusBarLeft
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.viewStatusBarRight
|
||||
import kotlinx.android.synthetic.main.view_status_bar.view.viewTextClock
|
||||
import kotlinx.coroutines.Runnable
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import java.util.concurrent.CopyOnWriteArrayList
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
@@ -36,7 +41,8 @@ class StatusBarView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : LinearLayout(context, attrs, defStyleAttr), IMoGoSkinModeChangeListener, IViewControlListener, IMoGoAutopilotStatusListener {
|
||||
) : LinearLayout(context, attrs, defStyleAttr), IMoGoSkinModeChangeListener, IViewControlListener,
|
||||
IMoGoAutopilotStatusListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "StatusBarView"
|
||||
@@ -61,35 +67,49 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
//添加view控制
|
||||
CallerHmiViewControlListenerManager.addListener(TAG,this)
|
||||
CallerHmiViewControlListenerManager.addListener(TAG, this)
|
||||
// 添加换肤监听
|
||||
CallerSkinModeListenerManager.addListener(TAG, this)
|
||||
//将状态窗口中的状态移到状态栏上
|
||||
CallerDevaToolsManager.showStatusBar(context, status_container)
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
updateStatusBarLeftView(true, FUNC_MODE_DEMO, DemoModeView(this.context))
|
||||
updateStatusBarLeftView(true, FUNC_MODE_RAIN, RainModeView(this.context))
|
||||
routeDownloadStatusRoot?.visibility = View.GONE
|
||||
CallerDevaToolsManager.registerRouteDownloadListener(TAG) { state ->
|
||||
when(state) {
|
||||
when (state) {
|
||||
0 -> {
|
||||
routeDownloadStatusRoot?.visibility = View.GONE
|
||||
}
|
||||
|
||||
1 -> {
|
||||
routeDownloadStatusRoot?.visibility = View.VISIBLE
|
||||
routeDownloadStatus?.background = ContextCompat.getDrawable(context, R.drawable.bg_autopilot_route_download_start)
|
||||
routeDownloadStatus?.background = ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.bg_autopilot_route_download_start
|
||||
)
|
||||
routeDownloadFailMark?.visibility = View.GONE
|
||||
}
|
||||
|
||||
2 -> {
|
||||
routeDownloadStatusRoot?.visibility = View.VISIBLE
|
||||
routeDownloadStatus?.background = ContextCompat.getDrawable(context, R.drawable.bg_autopilot_route_download_success)
|
||||
routeDownloadStatus?.background = ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.bg_autopilot_route_download_success
|
||||
)
|
||||
routeDownloadFailMark?.visibility = View.GONE
|
||||
UiThreadHandler.postDelayed(Runnable { routeDownloadStatusRoot?.visibility = View.GONE }, 3000)
|
||||
UiThreadHandler.postDelayed(Runnable {
|
||||
routeDownloadStatusRoot?.visibility = View.GONE
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
3 -> {
|
||||
routeDownloadStatusRoot?.visibility = View.VISIBLE
|
||||
routeDownloadStatus?.background = ContextCompat.getDrawable(context, R.drawable.bg_autopilot_route_download_failed)
|
||||
routeDownloadStatus?.background = ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.bg_autopilot_route_download_failed
|
||||
)
|
||||
routeDownloadFailMark?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
@@ -111,10 +131,11 @@ class StatusBarView @JvmOverloads constructor(
|
||||
super.onAutopilotRouteLineId(lineId)
|
||||
if (lineId != this.lineId.get()) {
|
||||
this.lineId.set(lineId)
|
||||
Logger.d(TAG, "--- onAutopilotRouteLineId ---: $lineId")
|
||||
routeDownloadStatusRoot?.scope?.launch {
|
||||
Logger.d(TAG, "--- onAutopilotRouteLineId 1 ---: $lineId")
|
||||
if ((routeDownloadStatusRoot?.visibility == View.VISIBLE) && AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
if ((routeDownloadStatusRoot?.visibility == View.VISIBLE) && AppIdentityModeUtils.isDriver(
|
||||
FunctionBuildConfig.appIdentityMode
|
||||
)
|
||||
) {
|
||||
routeDownloadStatusRoot?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
@@ -143,7 +164,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
|
||||
override fun updateStatusBarLeftView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
if (insert) {
|
||||
if(leftViewList.contains(tag)){
|
||||
if (leftViewList.contains(tag)) {
|
||||
return
|
||||
}
|
||||
leftViewList.add(0, tag)
|
||||
|
||||
Reference in New Issue
Block a user