diff --git a/app/build.gradle b/app/build.gradle index 101a12d2e0..d356c96e47 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,7 +8,7 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' -apply from: rootProject.file('gradle/bytex/bytex.gradle') +//apply from: rootProject.file('gradle/bytex/bytex.gradle') Properties properties = new Properties() properties.load(project.rootProject.file("gradle.properties").newDataInputStream()) diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java index 13363ad218..ede65c77c9 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java @@ -30,10 +30,15 @@ public class MogoRouteOverlayManager implements private final LinkedList> queue = new LinkedList<>(); - private AtomicBoolean hasGreenWave = new AtomicBoolean(false); + private final AtomicBoolean hasGreenWave = new AtomicBoolean(false); private final IViewControlListener listener = new IViewControlListener() { + @Override + public void v2xEventVisible(int v) { + + } + @Override public void updateFuncMode(@NonNull String tag, boolean b) { } diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/CameraMarkerView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/CameraMarkerView.kt index 0a75e46c92..1ca53c83fb 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/CameraMarkerView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/CameraMarkerView.kt @@ -2,8 +2,10 @@ package com.mogo.eagle.core.function.view import android.content.Context import android.util.AttributeSet +import android.view.View import android.view.ViewGroup import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener +import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager import com.mogo.eagle.core.function.map.R import com.mogo.eagle.core.utilcode.util.ThreadUtils @@ -33,6 +35,7 @@ class CameraMarkerView(context: Context, attrs: AttributeSet? = null, defStyleAt override fun onAttachedToWindow() { super.onAttachedToWindow() CallerSkinModeListenerManager.addListener(TAG, this) + CallerHmiViewControlListenerManager.invokeV2XEvent(TAG, View.VISIBLE) } override fun onSkinModeChange(skinMode: Int) { @@ -70,6 +73,7 @@ class CameraMarkerView(context: Context, attrs: AttributeSet? = null, defStyleAt override fun onDetachedFromWindow() { super.onDetachedFromWindow() CallerSkinModeListenerManager.removeListener(TAG) + CallerHmiViewControlListenerManager.invokeV2XEvent(TAG, View.GONE) } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/RoadCrossRoamView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/RoadCrossRoamView.kt index d5b223fd76..59ff46d787 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/RoadCrossRoamView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/RoadCrossRoamView.kt @@ -139,6 +139,7 @@ class RoadCrossRoamView @JvmOverloads constructor( CallerLogger.d("$M_MAP$TAG", "attachView return , mainPageVisible is false") return } + CallerHmiViewControlListenerManager.invokeV2XEvent(TAG, View.VISIBLE) bringToFront() CallerMapIdentifyManager.roam = Pair(TAG, true) this.visibility = View.VISIBLE @@ -198,6 +199,7 @@ class RoadCrossRoamView @JvmOverloads constructor( if (lightMode) { ivZhiRoadRoamView.clearAnimation() } + CallerHmiViewControlListenerManager.invokeV2XEvent(TAG, View.GONE) this.visibility = View.GONE } diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewControlListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewControlListener.kt index 0cd7fb81c2..512d2561c0 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewControlListener.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/view/IViewControlListener.kt @@ -7,6 +7,7 @@ interface IViewControlListener { companion object{ const val TrafficLightView_TAG = "TrafficLightView_TAG" const val LimitingVelocityView_TAG = "LimitingVelocityView_TAG" + const val V2X_EVENT_TAG = "V2X_EVENT_TAG" const val FUNC_MODE_DEMO = "demoMode" const val FUNC_MODE_RAIN = "rainMode" } @@ -16,6 +17,10 @@ interface IViewControlListener { } + fun v2xEventVisible(v:Int){ + + } + fun mainPageViewVisible(v:Int){ } diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiViewControlListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiViewControlListenerManager.kt index 0155205ad2..762bb23e90 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiViewControlListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiViewControlListenerManager.kt @@ -4,6 +4,7 @@ import android.view.View import android.view.ViewGroup import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener import com.mogo.eagle.core.function.call.base.CallerBase +import java.util.concurrent.ConcurrentHashMap /** * @author xiaoyuzhou @@ -12,6 +13,7 @@ import com.mogo.eagle.core.function.call.base.CallerBase */ object CallerHmiViewControlListenerManager : CallerBase() { + private var v2xEventTag = ConcurrentHashMap() private var mainPageVisible = true /** @@ -22,6 +24,18 @@ object CallerHmiViewControlListenerManager : CallerBase() M_LISTENERS[tag]?.visible(v) } + fun invokeV2XEvent(tag: String, v: Int) { + v2xEventTag[tag] = v + M_LISTENERS.forEach { + val listener = it.value + listener.v2xEventVisible(v) + } + } + + fun v2xEventShow():Boolean{ + return v2xEventTag.containsValue(View.VISIBLE) + } + fun invokeMainPageViewVisible(v: Int) { mainPageVisible = (v == View.VISIBLE) M_LISTENERS.forEach { @@ -46,6 +60,7 @@ object CallerHmiViewControlListenerManager : CallerBase() } fun invokeGreenWaveVisible(min: Int, max: Int, cross: Int) { + invokeVisible("GreenWave",View.VISIBLE) M_LISTENERS.forEach { val listener = it.value listener.onGreenWaveViewVisible(min, max, cross) @@ -53,6 +68,7 @@ object CallerHmiViewControlListenerManager : CallerBase() } fun invokeGreenWaveDismiss() { + invokeVisible("GreenWave",View.GONE) M_LISTENERS.forEach { val listener = it.value listener.onGreenWaveViewDismiss() diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/msgbox/CallerMsgBoxManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/msgbox/CallerMsgBoxManager.kt index 2124075422..0b18627380 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/msgbox/CallerMsgBoxManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/msgbox/CallerMsgBoxManager.kt @@ -25,15 +25,15 @@ object CallerMsgBoxManager { * 存储数据到消息盒子 */ fun saveMsgBox(bean: MsgBoxBean) { - CallerTrace.write(TAG,bean) - providerApi?.saveMsg(bean) //todo emArrow test +// CallerTrace.write(TAG,bean) +// providerApi?.saveMsg(bean) //todo emArrow test } /** * 存储含有pb的数据到消息盒子(区别与上述方法中的trace write) */ fun saveMsgBoxHasPB(bean: MsgBoxBean){ - providerApi?.saveMsg(bean) //todo emArrow test +// providerApi?.saveMsg(bean) //todo emArrow test } /**