[6.3.0][小智] 修正V2N事件到来时,小智形象不展示
This commit is contained in:
@@ -172,9 +172,9 @@ object DebugDataDispatch {
|
||||
val poiType = intent.getStringExtra("poiType")
|
||||
poiType?.let {
|
||||
if(state==0){
|
||||
CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.valueOf(poiType)), State.START)
|
||||
runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(poiType)), State.START) }
|
||||
}else{
|
||||
CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.valueOf(poiType)), State.STOP)
|
||||
runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(poiType)), State.STOP) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ internal object V2NIdentifyDrawer {
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
super.onShow()
|
||||
runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.valueOf(poiType)), State.START) }
|
||||
runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(poiType)), State.START) }
|
||||
CallerVisualAngleManager.changeAngle(
|
||||
RoadEvent(
|
||||
itx.longitude,
|
||||
@@ -159,7 +159,7 @@ internal object V2NIdentifyDrawer {
|
||||
|
||||
override fun onDismiss() {
|
||||
super.onDismiss()
|
||||
runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.valueOf(poiType)), State.STOP) }
|
||||
runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(poiType)), State.STOP) }
|
||||
CallerVisualAngleManager.changeAngle(Default())
|
||||
}
|
||||
},
|
||||
@@ -258,7 +258,7 @@ internal object V2NIdentifyDrawer {
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
super.onShow()
|
||||
runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.valueOf(poiType)), State.START) }
|
||||
runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(poiType)), State.START) }
|
||||
CallerVisualAngleManager.changeAngle(
|
||||
RoadEvent(
|
||||
lon,
|
||||
@@ -270,7 +270,7 @@ internal object V2NIdentifyDrawer {
|
||||
|
||||
override fun onDismiss() {
|
||||
super.onDismiss()
|
||||
runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.valueOf(poiType)), State.STOP) }
|
||||
runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(poiType)), State.STOP) }
|
||||
CallerVisualAngleManager.changeAngle(Default())
|
||||
}
|
||||
},
|
||||
|
||||
@@ -166,7 +166,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
V2XRoadEventEntity content = entity.getContent();
|
||||
if (content != null) {
|
||||
try {
|
||||
CallerHmiManager.INSTANCE.notifyXiaoZhiStatusChanged(new V2N(EventTypeEnumNew.valueOf(content.getPoiType())), State.START);
|
||||
CallerHmiManager.INSTANCE.notifyXiaoZhiStatusChanged(new V2N(EventTypeEnumNew.getEnumType(content.getPoiType())), State.START);
|
||||
} catch (Throwable ignore) {}
|
||||
if (isNeedChangeAngle()) {
|
||||
MarkerLocation location = content.getLocation();
|
||||
@@ -198,7 +198,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
V2XRoadEventEntity content = entity.getContent();
|
||||
if (content != null) {
|
||||
try {
|
||||
CallerHmiManager.INSTANCE.notifyXiaoZhiStatusChanged(new V2N(EventTypeEnumNew.valueOf(content.getPoiType())), State.STOP);
|
||||
CallerHmiManager.INSTANCE.notifyXiaoZhiStatusChanged(new V2N(EventTypeEnumNew.getEnumType(content.getPoiType())), State.STOP);
|
||||
} catch (Throwable ignore) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1478,5 +1478,10 @@ enum class EventTypeEnumNew(
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getEnumType(poiType: String): EventTypeEnumNew {
|
||||
return EventTypeEnumNew.values().find { it.poiType == poiType } ?: throw AssertionError("poiType: $poiType corresponding to enum value not find.")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user