Merge branch 'dev_robotaxi-d_240705_6.5.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_240705_6.5.0
This commit is contained in:
@@ -3,12 +3,15 @@ package com.mogo.eagle.core.function.business.travelreality.view
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Color
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.map.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
|
||||
@SuppressLint("ViewConstructor")
|
||||
class EventVideoView @JvmOverloads constructor(
|
||||
@@ -46,8 +49,26 @@ class EventVideoView @JvmOverloads constructor(
|
||||
|
||||
private fun initView() {
|
||||
videoImgView = findViewById(R.id.videoImg)
|
||||
val eventLayout = findViewById<ConstraintLayout>(R.id.eventMarkerLayout)
|
||||
val titleView = findViewById<TextView>(R.id.tvTitle)
|
||||
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
when (orientation) {
|
||||
0 -> {
|
||||
eventLayout.setBackgroundResource(R.drawable.event_video_right_driver_bg)
|
||||
}
|
||||
1 -> {
|
||||
eventLayout.setBackgroundResource(R.drawable.event_video_down_driver_bg)
|
||||
}
|
||||
2 -> {
|
||||
eventLayout.setBackgroundResource(R.drawable.event_video_left_driver_bg)
|
||||
}
|
||||
else -> {
|
||||
eventLayout.setBackgroundResource(R.drawable.event_video_up_driver_bg)
|
||||
}
|
||||
}
|
||||
titleView.setTextColor(Color.WHITE)
|
||||
}
|
||||
title?.let {
|
||||
titleView.text = it
|
||||
}
|
||||
|
||||
@@ -341,11 +341,11 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
initHandlers()
|
||||
advanceRequest()
|
||||
CallerPlanningRottingListenerManager.addListener(TAG, this)
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
|
||||
initHandlers()
|
||||
advanceRequest()
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
@@ -1078,7 +1078,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
lastTime = System.currentTimeMillis()
|
||||
}
|
||||
globalPathResp?.let { globalPath ->
|
||||
nonFrequentHandler?.removeCallbacksAndMessages(null)
|
||||
// nonFrequentHandler?.removeCallbacksAndMessages(null)
|
||||
travelNetWorkModel.cancelAllRequest()
|
||||
|
||||
val pointList = ArrayList<Point>()
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -2,6 +2,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="324dp"
|
||||
android:layout_height="396dp"
|
||||
android:id="@+id/eventMarkerLayout"
|
||||
android:background="@drawable/event_video_down_bg"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="396dp"
|
||||
android:layout_height="324dp"
|
||||
android:id="@+id/eventMarkerLayout"
|
||||
android:background="@drawable/event_video_left_bg"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="396dp"
|
||||
android:layout_height="324dp"
|
||||
android:id="@+id/eventMarkerLayout"
|
||||
android:background="@drawable/event_video_right_bg"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="324dp"
|
||||
android:layout_height="396dp"
|
||||
android:id="@+id/eventMarkerLayout"
|
||||
android:background="@drawable/event_video_up_bg"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.map
|
||||
|
||||
import android.os.Looper
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
@@ -23,6 +24,7 @@ import com.zhidaoauto.map.sdk.open.abs.OnHdDataDownByCityListener
|
||||
import com.zhidaoauto.map.sdk.open.data.CityInfo
|
||||
import com.zhidaoauto.map.sdk.open.data.MapDataApi
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import java.util.concurrent.TimeUnit.SECONDS
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
/**
|
||||
@@ -258,20 +260,33 @@ object MapDataWrapper : IMogoData {
|
||||
lat: Double,
|
||||
angle: Float
|
||||
): com.mogo.map.entities.RoadInfo {
|
||||
if (Looper.getMainLooper() == Looper.myLooper()) {
|
||||
throw AssertionError()
|
||||
}
|
||||
val latch = CountDownLatch(1)
|
||||
var tempCode: Int = Int.MIN_VALUE
|
||||
var tempData: RoadNameInfo? = null
|
||||
Logger.d(TAG, "getRoadInfo --- 1 ---")
|
||||
MapDataApi.getRoadName(lon, lat, angle, object : IResult<RoadNameInfo> {
|
||||
override fun result(code: Int, result: RoadNameInfo?) {
|
||||
Logger.d(TAG, "getRoadInfo ==> code: $code, result: $result")
|
||||
tempCode = code
|
||||
tempData = result
|
||||
latch.countDown()
|
||||
try {
|
||||
Logger.d(TAG, "getRoadInfo ==> code: $code, result: $result")
|
||||
tempCode = code
|
||||
tempData = result
|
||||
} finally {
|
||||
latch.countDown()
|
||||
}
|
||||
}
|
||||
})
|
||||
latch.await()
|
||||
Logger.d(TAG, "getRoadInfo --- 2 ---: code -> $tempCode, data -> $tempData")
|
||||
try {
|
||||
if (latch.await(5, SECONDS)) {
|
||||
Logger.d(TAG, "getRoadInfo --- 2 ---: code -> $tempCode, data -> $tempData")
|
||||
} else {
|
||||
Logger.d(TAG, "getRoadInfo --- 3 ---: code -> $tempCode, data -> $tempData")
|
||||
}
|
||||
} catch (e: InterruptedException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return com.mogo.map.entities.RoadInfo(
|
||||
tempCode,
|
||||
tempData?.tile_id?.toLong() ?: 0L,
|
||||
@@ -306,16 +321,33 @@ object MapDataWrapper : IMogoData {
|
||||
}
|
||||
|
||||
override fun getCrossRoad(lon: Double, lat: Double, angle: Double): CrossRoad? {
|
||||
if (Looper.getMainLooper() == Looper.myLooper()) {
|
||||
throw AssertionError()
|
||||
}
|
||||
val latch = CountDownLatch(1)
|
||||
Logger.d(TAG, "getCrossRoad --- 1 ---")
|
||||
val temp = AtomicReference<CrossRoad>()
|
||||
MapDataApi.getCrossRoad(lon, lat, angle.toFloat(), object : IResult<RoadCross> {
|
||||
|
||||
override fun result(code: Int, result: RoadCross?) {
|
||||
temp.set(CrossRoad(result?.status ?: 0, result?.tile_id ?: "", result?.cross_id ?: "", result?.tile_id_end ?: "", result?.cross_id_end ?: ""))
|
||||
latch.countDown()
|
||||
try {
|
||||
Logger.d(TAG, "getCrossRoad --- 1 - 1 ---")
|
||||
temp.set(CrossRoad(result?.status ?: 0, result?.tile_id ?: "", result?.cross_id ?: "", result?.tile_id_end ?: "", result?.cross_id_end ?: ""))
|
||||
} finally {
|
||||
latch.countDown()
|
||||
}
|
||||
}
|
||||
})
|
||||
latch.await()
|
||||
try {
|
||||
Logger.d(TAG, "getCrossRoad --- 2 ---")
|
||||
if (latch.await(5, SECONDS)) {
|
||||
Logger.d(TAG, "getCrossRoad --- 3 ---")
|
||||
} else {
|
||||
Logger.d(TAG, "getCrossRoad --- 4 ---")
|
||||
}
|
||||
} catch (e: InterruptedException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return temp.get()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user