[2.13.0]解决视角切换相关bug
This commit is contained in:
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.SystemClock
|
||||
import android.util.*
|
||||
import androidx.lifecycle.Lifecycle.Event
|
||||
import androidx.lifecycle.Lifecycle.Event.ON_DESTROY
|
||||
import androidx.lifecycle.LifecycleEventObserver
|
||||
@@ -67,8 +68,12 @@ object CallerVisualAngleManager {
|
||||
|
||||
private val listener = object : OnRoadListener {
|
||||
private var roadId = ""
|
||||
|
||||
|
||||
override fun onRoadIdInfo(roadId: String) {
|
||||
|
||||
val oldRoadId = this.roadId
|
||||
Log.d("RWJ", "-- onRoadIdInfo --: prev: ${this.roadId} -> curr: $roadId")
|
||||
if (oldRoadId != roadId) {
|
||||
if (hasCrossRoad) {
|
||||
hasCrossRoad = false
|
||||
@@ -89,6 +94,7 @@ object CallerVisualAngleManager {
|
||||
|
||||
|
||||
override fun onStopLineInfo(info: StopLine) {
|
||||
Log.d("RWJ", "-- onStopLineInfo --: $info")
|
||||
if (!hasCrossRoad && info.distanceOfCarToStopLine <= 30.0) {
|
||||
hasCrossRoad = true
|
||||
beginLocation.set(CallerMapLocationListenerManager.getCurrentLocation())
|
||||
@@ -238,11 +244,6 @@ object CallerVisualAngleManager {
|
||||
doChangeAngle(Record(scene, triggerTime = triggerTime))
|
||||
}
|
||||
} else {
|
||||
if (scene.javaClass == displayed.target.javaClass) {
|
||||
Logger.d("${M_DEVA}${TAG}", "触发场景:${scene} --- 5 ---")
|
||||
defaultDelayJob?.safeCancel()
|
||||
return@launch
|
||||
}
|
||||
val prev = displayed.target
|
||||
val prevTriggerTime = displayed.triggerTime
|
||||
if (scene is Turning) {
|
||||
|
||||
Reference in New Issue
Block a user