[2.13.0-arch-opt] merge
This commit is contained in:
@@ -26,6 +26,16 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<!--Vip车辆标志-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VipIdentificationView
|
||||
android:layout_width="@dimen/module_vip_width"
|
||||
android:layout_height="@dimen/module_vip_height"
|
||||
android:visibility="gone"
|
||||
app:marginStart="@dimen/dp_640"
|
||||
app:marginTop="@dimen/dp_80"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<com.mogo.och.common.module.wigets.OCHBorderShadowLayout
|
||||
android:id="@+id/arrive_station_shadow"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -21,6 +21,17 @@
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!--Vip车辆标志-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VipIdentificationView
|
||||
android:layout_width="@dimen/module_vip_width"
|
||||
android:layout_height="@dimen/module_vip_height"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:marginStart="@dimen/dp_640"
|
||||
app:marginTop="@dimen/dp_80" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/module_mogo_och_autopilot_status"
|
||||
android:layout_width="@dimen/module_mogo_och_autopilot_status_bg_width"
|
||||
|
||||
@@ -28,6 +28,16 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--Vip车辆标志-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VipIdentificationView
|
||||
android:layout_width="@dimen/module_vip_width"
|
||||
android:layout_height="@dimen/module_vip_height"
|
||||
android:visibility="gone"
|
||||
app:marginStart="@dimen/dp_540"
|
||||
app:marginTop="@dimen/dp_40"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_och_taxi_swich_map_iv"
|
||||
android:layout_width="@dimen/module_mogo_och_operation_status_bg_width"
|
||||
|
||||
@@ -93,8 +93,6 @@ class TaxiProvider implements IMogoOCH , IMogoStatusChangedListener {
|
||||
public Fragment createCoverage(@Nullable FragmentActivity fragmentActivity, @Nullable Integer integer) {
|
||||
this.mActivity = fragmentActivity;
|
||||
this.mContainerId = integer;
|
||||
|
||||
// UiThreadHandler.postDelayed(() -> stepIntoVrMode(), 5_000L);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,6 +79,17 @@
|
||||
tools:visibility="visible" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!--Vip车辆标志-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VipIdentificationView
|
||||
android:layout_width="@dimen/module_vip_width"
|
||||
android:layout_height="@dimen/module_vip_height"
|
||||
android:visibility="gone"
|
||||
app:marginStart="@dimen/dp_640"
|
||||
app:marginTop="@dimen/dp_80"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_mogo_och_station_panel_container"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -3,66 +3,68 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:bgColor="@android:color/transparent"
|
||||
app:blurRadius="20dp"
|
||||
app:shadowColor="#C7151D4C"
|
||||
app:shadowRadius="42dp"
|
||||
app:blurRadius="20dp"
|
||||
app:xOffset="0dp"
|
||||
app:yOffset="0dp"
|
||||
app:bgColor="@android:color/transparent">
|
||||
app:yOffset="0dp">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragment_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_och_taxi_order_status_change_test_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/test_bar_current_order_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:textColor="@android:color/white"/>
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/test_bar_current_line_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:textColor="@android:color/white"/>
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/test_bar_current_traj_md5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:textColor="@android:color/white"/>
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/test_bar_current_stop_md5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:textColor="@android:color/white"/>
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/test_bar_current_traj_md5_dpqp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:textColor="@android:color/white"/>
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/test_bar_current_stop_md5_dpqp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:textColor="@android:color/white"/>
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/test_bar_to_start"
|
||||
@@ -70,19 +72,20 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="到达上车点"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/test_bar_start_service_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:text="开启服务"/>
|
||||
android:text="开启服务"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/test_bar_on_the_way_to_end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:text="开启自动驾驶"/>
|
||||
android:text="开启自动驾驶"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/test_bar_to_end"
|
||||
|
||||
@@ -10,6 +10,10 @@ import com.mogo.eagle.function.biz.dispatch.DispatchAutoPilotManager.Companion.d
|
||||
import com.mogo.eagle.function.biz.monitoring.CronTaskManager.Companion.cronTaskManager
|
||||
import com.mogo.eagle.function.biz.notice.NoticeSocketManager.Companion.noticeSocketManager
|
||||
import com.mogo.eagle.function.biz.notice.network.NoticeNetWorkManager
|
||||
import com.mogo.eagle.function.biz.v2x.speedlimit.SpeedLimitDataManager
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightDispatcher
|
||||
import com.mogo.eagle.function.biz.v2x.vip.VipCarManager
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_FUNC_BIZ)
|
||||
class FuncBizProvider : IMoGoFuncBizProvider {
|
||||
@@ -21,6 +25,12 @@ class FuncBizProvider : IMoGoFuncBizProvider {
|
||||
noticeSocketManager.init(context)
|
||||
dispatchAutoPilotManager.init(context)
|
||||
cronTaskManager.startCronTask()
|
||||
|
||||
MogoTrafficLightManager.INSTANCE.initServer(context)
|
||||
TrafficLightDispatcher.INSTANCE.initServer(context) //todo 红绿灯中心模块放入dataCenter
|
||||
VipCarManager.INSTANCE.initServer(context)
|
||||
SpeedLimitDataManager.getInstance().start()
|
||||
// RedLightWarningManager.INSTANCE.listenTrafficLight()
|
||||
}
|
||||
|
||||
override fun feedBackNoticeTraffic(infoId: String, sn: String, accept: Int) {
|
||||
@@ -62,5 +72,9 @@ class FuncBizProvider : IMoGoFuncBizProvider {
|
||||
noticeSocketManager.release()
|
||||
dispatchAutoPilotManager.release()
|
||||
cronTaskManager.release()
|
||||
|
||||
VipCarManager.INSTANCE.destroy()
|
||||
TrafficLightDispatcher.INSTANCE.destroy()
|
||||
// RedLightWarningManager.INSTANCE.onDestroy()
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.redlightwarning
|
||||
package com.mogo.eagle.function.biz.v2x.redlightwarning
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_IVP
|
||||
@@ -21,7 +21,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.core.MogoTrafficLightManager
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.utilcode.util.LocationUtils
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.speedlimit;
|
||||
package com.mogo.eagle.function.biz.v2x.speedlimit;
|
||||
|
||||
import static com.mogo.eagle.core.data.config.HmiBuildConfig.isShowObuLimitSpeedView;
|
||||
import static com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.BIZ_SLW;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.trafficlight
|
||||
package com.mogo.eagle.function.biz.v2x.trafficlight
|
||||
|
||||
class TrafficLightConst {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.trafficlight
|
||||
package com.mogo.eagle.function.biz.v2x.trafficlight
|
||||
|
||||
import com.mogo.eagle.core.data.trafficlight.*
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.trafficlight.core
|
||||
package com.mogo.eagle.function.biz.v2x.trafficlight.core
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
@@ -8,12 +8,12 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.TrafficLightHMIManager
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_LOOP_SEARCH_CROSS_ROAD
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_LOOP_SEARCH_TRAFFIC_LIGHT
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_CROSS_ROAD
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_TRAFFIC_LIGHT
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.network.TrafficLightNetWorkModel
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.TrafficLightHMIManager
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_LOOP_SEARCH_CROSS_ROAD
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_LOOP_SEARCH_TRAFFIC_LIGHT
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_CROSS_ROAD
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_TRAFFIC_LIGHT
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.network.TrafficLightNetWorkModel
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import mogo.telematics.pad.MessagePad
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.trafficlight.core
|
||||
package com.mogo.eagle.function.biz.v2x.trafficlight.core
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
@@ -8,7 +8,7 @@ import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.TrafficLightHMIManager
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.TrafficLightHMIManager
|
||||
import perception.TrafficLightOuterClass
|
||||
import perception.TrafficLightOuterClass.TrafficLight
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.trafficlight.core
|
||||
package com.mogo.eagle.function.biz.v2x.trafficlight.core
|
||||
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.trafficlight.network
|
||||
package com.mogo.eagle.function.biz.v2x.trafficlight.network
|
||||
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
import com.mogo.eagle.core.data.trafficlight.RoadIDResult
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.trafficlight.network
|
||||
package com.mogo.eagle.function.biz.v2x.trafficlight.network
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.vip
|
||||
package com.mogo.eagle.function.biz.v2x.vip
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
@@ -26,8 +26,8 @@ import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.core.MogoTrafficLightManager
|
||||
import com.mogo.eagle.core.function.v2x.vip.network.VipNetWorkModel
|
||||
import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager
|
||||
import com.mogo.eagle.function.biz.v2x.vip.network.VipNetWorkModel
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
@@ -156,7 +156,6 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
MSG_WHAT_VIP_CANCEL,
|
||||
cancelDelayTime - System.currentTimeMillis()
|
||||
)
|
||||
CallerHmiManager.vipIdentification(true)
|
||||
CallVipSetListenerManager.invokeVipSetStatus(true)
|
||||
CallerTrafficLightListenerManager.addListener(TAG, this)
|
||||
}
|
||||
@@ -167,7 +166,6 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
handler.removeMessages(MSG_WHAT_VIP_CANCEL)
|
||||
}
|
||||
resetConditions()
|
||||
CallerHmiManager.vipIdentification(false)
|
||||
CallVipSetListenerManager.invokeVipSetStatus(false)
|
||||
CallerTrafficLightListenerManager.removeListener(TAG)
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.vip.network
|
||||
package com.mogo.eagle.function.biz.v2x.vip.network
|
||||
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
import com.mogo.eagle.core.data.v2x.VipRequest
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.vip.network
|
||||
package com.mogo.eagle.function.biz.v2x.vip.network
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.BaseResponse
|
||||
@@ -180,20 +180,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
|
||||
private var busOperationStatus: IOchBusView? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
|
||||
override fun vipIdentification(visible: Boolean) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
if (visible) {
|
||||
flVipIdentificationView?.visibility = View.VISIBLE
|
||||
} else {
|
||||
flVipIdentificationView?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
initViewShowWithConfig()
|
||||
// 同步AppInfo Config信息
|
||||
|
||||
@@ -3,49 +3,71 @@ package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.vip.IMoGoVipSetListener
|
||||
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_vip_identification.view.*
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
|
||||
/**
|
||||
* VIP标识控件
|
||||
*/
|
||||
class VipIdentificationView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
class VipIdentificationView : ConstraintLayout, IMoGoVipSetListener {
|
||||
|
||||
init {
|
||||
companion object {
|
||||
const val TAG = "VipIdentificationView"
|
||||
}
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet) : this(context, attributeSet, 0) {
|
||||
}
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super(
|
||||
context,
|
||||
attributeSet,
|
||||
defStyleAttr
|
||||
) {
|
||||
init(attributeSet, defStyleAttr)
|
||||
}
|
||||
|
||||
private var marginStart: Float = 0.0f
|
||||
private var marginTop: Float = 0.0f
|
||||
|
||||
private fun init(attrs: AttributeSet, defStyleAttr: Int) {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_vip_identification, this, true)
|
||||
val a = context.obtainStyledAttributes(
|
||||
attrs,
|
||||
R.styleable.VipIdentificationView,
|
||||
defStyleAttr,
|
||||
0
|
||||
)
|
||||
marginStart = a.getDimension(R.styleable.VipIdentificationView_marginStart, 0.0f)
|
||||
marginTop = a.getDimension(R.styleable.VipIdentificationView_marginTop, 0.0f)
|
||||
a.recycle()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
val lp = this.layoutParams as LayoutParams
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left_bus_passenger).toInt()
|
||||
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top_passenger).toInt()
|
||||
} else if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left_taxi_passenger).toInt()
|
||||
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top_passenger).toInt()
|
||||
} else {
|
||||
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left).toInt()
|
||||
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top).toInt()
|
||||
}
|
||||
lp.marginStart = marginStart.toInt()
|
||||
lp.topMargin = marginTop.toInt()
|
||||
this.layoutParams = lp
|
||||
invalidate()
|
||||
CallVipSetListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
fun setVipIdentificationVisible(visible: Boolean) {
|
||||
UiThreadHandler.post {
|
||||
ivVipIdentification.visibility = visibility
|
||||
override fun onVipSet(status: Boolean) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
visibility = if (status) {
|
||||
View.VISIBLE
|
||||
} else {
|
||||
View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallVipSetListenerManager.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
@@ -40,13 +40,13 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--Vip车辆标志-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VipIdentificationView
|
||||
android:id="@+id/flVipIdentificationView"
|
||||
android:layout_width="@dimen/module_vip_width"
|
||||
android:layout_height="@dimen/module_vip_height"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.VipIdentificationView-->
|
||||
<!-- android:id="@+id/flVipIdentificationView"-->
|
||||
<!-- android:layout_width="@dimen/module_vip_width"-->
|
||||
<!-- android:layout_height="@dimen/module_vip_height"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.takeover.TakeOverView
|
||||
android:id="@+id/clTakeOverView"
|
||||
|
||||
@@ -68,4 +68,9 @@
|
||||
<item name="android:topDark">@android:color/transparent</item>
|
||||
<item name="android:borderlessButtonStyle">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<declare-styleable name="VipIdentificationView">
|
||||
<attr name="marginStart" format="dimension" />
|
||||
<attr name="marginTop" format="dimension" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -5,11 +5,7 @@ import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_V2X_MODULE
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightManager
|
||||
import com.mogo.eagle.core.function.v2x.events.V2XEventManager
|
||||
import com.mogo.eagle.core.function.v2x.speedlimit.SpeedLimitDataManager
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.core.TrafficLightDispatcher
|
||||
import com.mogo.eagle.core.function.v2x.vip.VipCarManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
|
||||
@Route(path = PATH_V2X_MODULE)
|
||||
@@ -19,29 +15,18 @@ class V2XProvider : IMoGoFunctionServerProvider {
|
||||
get() = "V2XProvider"
|
||||
|
||||
override fun init(context: Context) {
|
||||
CallerTrafficLightManager.getTrafficLightProvider().initTrafficLightServer(context)
|
||||
VipCarManager.INSTANCE.initServer(context)
|
||||
SpeedLimitDataManager.getInstance().start()
|
||||
TrafficLightDispatcher.INSTANCE.initServer(context)
|
||||
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
//不处理
|
||||
} else {
|
||||
V2XEventManager.init(context)
|
||||
}
|
||||
|
||||
// RedLightWarningManager.INSTANCE.listenTrafficLight()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
VipCarManager.INSTANCE.destroy()
|
||||
TrafficLightDispatcher.INSTANCE.destroy()
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
//不处理
|
||||
} else {
|
||||
V2XEventManager.onDestroy()
|
||||
}
|
||||
|
||||
// RedLightWarningManager.INSTANCE.onDestroy()
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.trafficlight
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightControl
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightDetail
|
||||
import com.mogo.eagle.core.function.api.trafficlight.ITrafficLightProvider
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.TrafficLightConst.Companion.MODULE_NAME
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.core.MogoTrafficLightManager
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_TRAFFIC_LIGHT)
|
||||
class TrafficLightProvider : ITrafficLightProvider {
|
||||
|
||||
override val functionName: String
|
||||
get() = MODULE_NAME
|
||||
|
||||
override fun init(context: Context) {
|
||||
|
||||
}
|
||||
|
||||
override fun initTrafficLightServer(context: Context) {
|
||||
MogoTrafficLightManager.INSTANCE.initServer(context)
|
||||
}
|
||||
|
||||
override fun getTrafficLightCurrentState(): TrafficLightDetail? {
|
||||
return MogoTrafficLightManager.INSTANCE.getTrafficLightCurrentState()
|
||||
}
|
||||
|
||||
override fun turnLightToGreen(
|
||||
lightId: Int,
|
||||
crossingNo: String,
|
||||
heading: Double,
|
||||
controlTime: Int,
|
||||
onSuccess: ((TrafficLightControl) -> Unit),
|
||||
onError: ((String) -> Unit)
|
||||
) {
|
||||
return MogoTrafficLightManager.INSTANCE.turnLightToGreen(
|
||||
lightId,
|
||||
crossingNo,
|
||||
heading,
|
||||
controlTime,
|
||||
onSuccess,
|
||||
onError
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
MogoTrafficLightManager.INSTANCE.onDestroy()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -35,12 +35,6 @@ public class MogoServicePaths {
|
||||
*/
|
||||
public static final String PATH_V2X_MODULE = "/v2x_api/module";
|
||||
|
||||
/**
|
||||
* 红绿灯模块
|
||||
*/
|
||||
@Keep
|
||||
public static final String PATH_TRAFFIC_LIGHT = "/v2x_api/api/trafficlight";
|
||||
|
||||
/**
|
||||
* obu-mogo 模块
|
||||
*/
|
||||
|
||||
@@ -202,11 +202,6 @@ interface IMoGoHmiProvider : IMoGoHmiViewProxy {
|
||||
*/
|
||||
fun showNoticeNormalData(normalData: NoticeNormalData?)
|
||||
|
||||
/**
|
||||
* 展示VIP标识
|
||||
*/
|
||||
fun vipIdentification(visible: Boolean)
|
||||
|
||||
fun startRoadCameraLive(flvUrl: String)
|
||||
|
||||
fun showNoSignView()
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.trafficlight
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightControl
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightDetail
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
|
||||
interface ITrafficLightProvider : IMoGoFunctionServerProvider {
|
||||
|
||||
fun initTrafficLightServer(context: Context)
|
||||
|
||||
/**
|
||||
* 获取当前红绿灯数据状态
|
||||
*/
|
||||
fun getTrafficLightCurrentState(): TrafficLightDetail?
|
||||
|
||||
/**
|
||||
* 变灯
|
||||
*/
|
||||
fun turnLightToGreen(
|
||||
lightId: Int,
|
||||
crossingNo: String,
|
||||
heading: Double,
|
||||
controlTime:Int,
|
||||
onSuccess: ((TrafficLightControl) -> Unit),
|
||||
onError: ((String) -> Unit)
|
||||
)
|
||||
}
|
||||
@@ -297,13 +297,6 @@ object CallerHmiManager {
|
||||
waringProviderApi?.showNoticeNormalData(noticeNormal)
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示VIP标识
|
||||
*/
|
||||
fun vipIdentification(visible: Boolean) {
|
||||
waringProviderApi?.vipIdentification(visible)
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启道路视频直播
|
||||
*/
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.trafficlight
|
||||
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.trafficlight.ITrafficLightProvider
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
object CallerTrafficLightManager : CallerBase<Any>() {
|
||||
|
||||
fun getTrafficLightProvider(): ITrafficLightProvider {
|
||||
return getApiInstance(
|
||||
ITrafficLightProvider::class.java,
|
||||
MogoServicePaths.PATH_TRAFFIC_LIGHT
|
||||
)
|
||||
}
|
||||
|
||||
fun getTrafficLightCurrentState() {
|
||||
getTrafficLightProvider().getTrafficLightCurrentState()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -69,9 +69,9 @@ public class MogoAiCloudSocketManager extends ConnectionLifecycleListener implem
|
||||
@Override
|
||||
public void init(Context context, String appId, double lat, double lon) {
|
||||
this.mAppId = appId;
|
||||
SocketManager.getInstance().init(context, lat, lon);
|
||||
SocketManager.getInstance().registerSocketConnCallback(this);
|
||||
SocketManager.getInstance().registerSocketErrorCallback(TAG, this);
|
||||
SocketManager.getInstance().init(context, lat, lon);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -163,4 +163,4 @@ ADAS_DATA_LIB_CHILD_VERSION=.0
|
||||
|
||||
|
||||
# 线程优化版本
|
||||
THREAD_OPT_VERSION=3.0.2
|
||||
THREAD_OPT_VERSION=4.0.0
|
||||
|
||||
Reference in New Issue
Block a user