[2.13.0-arch-opt] move dispatch to biz and remove gradle settings

This commit is contained in:
zhongchao
2023-01-03 22:11:48 +08:00
parent 86149bf22d
commit 22df250f6f
71 changed files with 944 additions and 1609 deletions

View File

@@ -95,7 +95,6 @@ dependencies {
api rootProject.ext.dependencies.mogo_core_function_v2x
api rootProject.ext.dependencies.mogo_core_function_monitoring
api rootProject.ext.dependencies.mogo_core_function_devatools
api rootProject.ext.dependencies.mogo_core_function_carcorder
api rootProject.ext.dependencies.mogo_core_function_call
api rootProject.ext.dependencies.mogo_core_function_msgbox
@@ -115,7 +114,6 @@ dependencies {
api project(':core:function-impl:mogo-core-function-v2x')
api project(':core:function-impl:mogo-core-function-monitoring')
api project(':core:function-impl:mogo-core-function-devatools')
api project(':core:function-impl:mogo-core-function-dispatch')
api project(':core:function-impl:mogo-core-function-chat')
api project(':core:function-impl:mogo-core-function-bindingcar')
api project(':core:function-impl:mogo-core-function-datacenter')

View File

@@ -179,5 +179,12 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<receiver android:name="com.mogo.eagle.core.function.hmi.receiver.DispatchTestPanelBroadCastReceiver">
<intent-filter>
<action android:name="com.dispatch.test_panel_control" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
</application>
</manifest>

View File

@@ -0,0 +1,41 @@
package com.mogo.eagle.core.function.hmi.receiver
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager
import com.mogo.eagle.core.function.hmi.receiver.DispatchTestPanelBroadCastReceiver
import java.lang.Exception
class DispatchTestPanelBroadCastReceiver : BroadcastReceiver() {
companion object {
private const val TAG = "DispatchTestPanelBroadCastReceiver"
/**
* Adas测试控制面板广播Action
*/
const val BROADCAST_TEST_PANEL_CONTROL_TYPE_EXTRA_KEY = "sceneType"
}
override fun onReceive(context: Context, intent: Intent) {
try {
val sceneType = intent.getIntExtra(BROADCAST_TEST_PANEL_CONTROL_TYPE_EXTRA_KEY, 0)
// 分发场景
dispatchSceneTest(sceneType)
} catch (e: Exception) {
e.printStackTrace()
}
}
/**
* 分发处理场景
*
* @param sceneType 场景类型
*/
private fun dispatchSceneTest(sceneType: Int) {
CallerFuncBizManager.bizProvider.testDispatch(sceneType)
}
}

View File

@@ -33,6 +33,7 @@ import com.mogo.eagle.core.data.config.HmiBuildConfig
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_RTS
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.mogo.eagle.core.data.enums.SidePattern
import com.mogo.eagle.core.data.enums.SidePattern.*
@@ -52,7 +53,7 @@ import com.mogo.eagle.core.function.api.hmi.view.IOchBusView
import com.mogo.eagle.core.function.api.hmi.view.IViewLimitingVelocity
import com.mogo.eagle.core.function.api.hmi.view.IViewNotification
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWaringProvider
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoHmiProvider
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
@@ -72,8 +73,9 @@ import com.mogo.eagle.core.function.hmi.ui.bindingcar.ToBindingCarDialog
import com.mogo.eagle.core.function.hmi.ui.bindingcar.UpgradeAppDialog
import com.mogo.eagle.core.function.hmi.ui.camera.CameraListView
import com.mogo.eagle.core.function.hmi.ui.camera.RoadVideoDialog
import com.mogo.eagle.core.function.hmi.ui.dispatch.DispatchDialogManager
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeCheckDialog
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeTrafficDialog
import com.mogo.eagle.core.function.hmi.ui.notice.traffic.NoticeTrafficDialog
import com.mogo.eagle.core.function.hmi.ui.setting.DebugSettingView
import com.mogo.eagle.core.function.hmi.ui.setting.IPCReportWindow
import com.mogo.eagle.core.function.hmi.ui.setting.ReportListFloatWindow
@@ -119,7 +121,7 @@ import java.util.*
*/
@Route(path = MoGoFragmentPaths.PATH_FRAGMENT_HMI)
class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
IMoGoWaringProvider,
IMoGoHmiProvider,
IMoGoHmiViewProxy,
MoGoHmiContract.View,
IMoGoAutopilotRecordListener,
@@ -253,13 +255,13 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
}
cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
if(isChecked){
if (isChecked) {
viewDriverMsgBoxList.visibility = View.VISIBLE
viewDriverMsgBoxList.notifyData()
viewDriverMsgBoxBubble.visibility = View.GONE
viewDriverMsgBoxBubble.isShowData(false)
CallerHmiManager.updateDriverMsgBoxTipView(false)
}else{
} else {
viewDriverMsgBoxList.visibility = View.GONE
viewDriverMsgBoxBubble.visibility = View.VISIBLE
viewDriverMsgBoxBubble.isShowData(true)
@@ -267,24 +269,25 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
}
cbMsgBoxPassenger.setOnCheckedChangeListener { _, isChecked ->
if(isChecked){
if (isChecked) {
viewPassengerMsgBoxList.visibility = View.VISIBLE
viewPassengerMsgBoxBubble.visibility = View.GONE
viewPassengerMsgBoxBubble.isShowData(false)
CallerHmiManager.updatePassengerMsgBoxTipView(false)
}else{
} else {
viewPassengerMsgBoxList.visibility = View.GONE
viewPassengerMsgBoxBubble.visibility = View.VISIBLE
viewPassengerMsgBoxBubble.isShowData(true)
}
}
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
cbMsgBoxDriver.visibility = View.VISIBLE
viewDriverMsgBoxBubble.visibility = View.VISIBLE
}
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)
) {
cbMsgBoxPassenger.visibility = View.VISIBLE
viewPassengerMsgBoxBubble.visibility = View.VISIBLE
}
@@ -467,18 +470,33 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
statusBarView?.updateMfStatus(tag, status)
}
override fun showDispatchDialog(msgData: DispatchAdasAutoPilotLocReceiverBean) {
context?.let {
if (DispatchDialogManager.getInstance(it).isShowing) {
return
}
DispatchDialogManager.getInstance(it).showDialog(msgData)
}
}
override fun dismissDispatchDialog() {
context?.let {
DispatchDialogManager.getInstance(it).releaseDialog()
}
}
override fun updateDriverMsgBoxTipView(show: Boolean) {
if(show){
if (show) {
MsgBoxTipView.visibility = View.VISIBLE
}else{
} else {
MsgBoxTipView.visibility = View.GONE
}
}
override fun updatePassengerMsgBoxTipView(show: Boolean) {
if(show){
if (show) {
MsgBoxPTipView.visibility = View.VISIBLE
}else{
} else {
MsgBoxPTipView.visibility = View.GONE
}
}
@@ -1155,7 +1173,11 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
}
ThreadUtils.runOnUiThread {
context?.let {
noticeTrafficDialog = NoticeTrafficDialog(it, trafficStylePushData)
noticeTrafficDialog =
NoticeTrafficDialog(
it,
trafficStylePushData
)
noticeTrafficDialog?.show()
}
}
@@ -1372,7 +1394,10 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
* 显示转向灯效果 if (HmiBuildConfig.isShowBadCaseView) {
*/
override fun showTurnLight(light: Int) {
CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight = $light ---isLeftLight = $isLeftLight ---isRightLight = $isRightLight")
CallerLogger.d(
"${SceneConstant.M_DEVA}${"TurnLight"}",
"---showTurnLight = $light ---isLeftLight = $isLeftLight ---isRightLight = $isRightLight"
)
if (HmiBuildConfig.isShowTurnLightView) {
ThreadUtils.runOnUiThread {
if (light == 1 || light == 2) {
@@ -1391,7 +1416,10 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
isLeftLight = true
isRightLight = false
isDisappare = false
CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight ---light = 1")
CallerLogger.d(
"${SceneConstant.M_DEVA}${"TurnLight"}",
"---showTurnLight ---light = 1"
)
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(4, 500)
}
} else if (light == 2) { //右转灯
@@ -1399,7 +1427,10 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
isRightLight = true
isLeftLight = false
isDisappare = false
CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight ---light = 2")
CallerLogger.d(
"${SceneConstant.M_DEVA}${"TurnLight"}",
"---showTurnLight ---light = 2"
)
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(2, 500)
}
} else {
@@ -1407,7 +1438,10 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
isDisappare = true
isLeftLight = false
isRightLight = false
CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight ---light other")
CallerLogger.d(
"${SceneConstant.M_DEVA}${"TurnLight"}",
"---showTurnLight ---light other"
)
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
}
}
@@ -1430,13 +1464,19 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
if (light == 1) { //刹车灯亮
if (!isBrake) {
isBrake = true
CallerLogger.d("${SceneConstant.M_DEVA}${"BrakeLight"}", " showBrakeLight light = 1 ")
CallerLogger.d(
"${SceneConstant.M_DEVA}${"BrakeLight"}",
" showBrakeLight light = 1 "
)
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
}
} else {
if (isBrake) {//默认 不亮灯
isBrake = false
CallerLogger.d("${SceneConstant.M_DEVA}${"BrakeLight"}", " showBrakeLight light != 1 ")
CallerLogger.d(
"${SceneConstant.M_DEVA}${"BrakeLight"}",
" showBrakeLight light != 1 "
)
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
}
}

View File

@@ -1,251 +0,0 @@
package com.mogo.eagle.core.function.hmi.ui.carcorder
import android.animation.Animator
import android.app.Activity
import android.content.Context
import android.hardware.usb.UsbDevice
import android.os.Looper
import android.view.*
import android.view.animation.OvershootInterpolator
import com.mogo.cloud.live.manager.ILiveStreamManager
import com.mogo.cloud.live.manager.LiveStreamManagerImpl
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator
import com.mogo.eagle.core.data.enums.SidePattern
import com.mogo.usbcamera.UVCCameraHelper
import com.serenegiant.usb.ParentPreviewConstraintLayout
import com.serenegiant.usb.widget.CameraViewInterface
import kotlinx.android.synthetic.main.view_carcorder_preview.view.*
/**
* @author donghongyu
* @date 2021/9/30 8:46 下午
* USB-Camera 摄像头预览
*
* TODO 临时方案,后面考虑封装将摄像头数据流通过 Tensorflow-lite 处理后展示
*/
class CarcorderPreviewView private constructor(
context: Context
) : ParentPreviewConstraintLayout(context),
CameraViewInterface.Callback {
private val TAG = "CarcorderPreviewView"
private var mCameraHelper: UVCCameraHelper? = null
private var isRequest = false
private var isPreview = false
private var liveStreamManager: ILiveStreamManager? = null
init {
LayoutInflater.from(context).inflate(R.layout.view_carcorder_preview, this, true)
}
companion object {
private var mCarcorderPreviewViewFloat: WarningFloat.Builder? = null
@Volatile
var instance: CarcorderPreviewView? = null
fun getInstance(context: Activity): CarcorderPreviewView {
if (instance == null) {
synchronized(CarcorderPreviewView::class) {
if (instance == null) {
instance = CarcorderPreviewView(context)
}
}
}
return instance!!
}
/**
* 展示窗口
*/
fun show(context: Activity) {
if (mCarcorderPreviewViewFloat == null) {
val carcorderPreviewVie = getInstance(context)
mCarcorderPreviewViewFloat = WarningFloat.with(context)
.setTag("CarcorderPreviewView")
.setLayout(carcorderPreviewVie)
.setSidePattern(SidePattern.RIGHT)
.setGravity(Gravity.RIGHT, offsetY = 250)
.setImmersionStatusBar(true)
.setAnimator(object : DefaultAnimator() {
override fun enterAnim(
view: View,
params: WindowManager.LayoutParams,
windowManager: WindowManager,
sidePattern: SidePattern
): Animator? =
super.enterAnim(view, params, windowManager, sidePattern)
?.apply {
interpolator = OvershootInterpolator()
}
override fun exitAnim(
view: View,
params: WindowManager.LayoutParams,
windowManager: WindowManager,
sidePattern: SidePattern
): Animator? =
super.exitAnim(view, params, windowManager, sidePattern)
?.setDuration(200)
})
.show()
} else {
dismiss()
}
}
/**
* 隐藏窗口
*/
fun dismiss() {
if (mCarcorderPreviewViewFloat != null) {
WarningFloat.dismiss(mCarcorderPreviewViewFloat!!.config.floatTag, false)
mCarcorderPreviewViewFloat = null
}
}
}
private val listener: UVCCameraHelper.OnMyDevConnectListener = object : UVCCameraHelper.OnMyDevConnectListener {
override fun onAttachDev(device: UsbDevice?) {
CallerLogger.d("$M_HMI$TAG", "onAttachDev")
// request open permission
if (!isRequest) {
isRequest = true
mCameraHelper?.requestPermission(0)
}
}
override fun onDettachDev(device: UsbDevice) {
CallerLogger.d("$M_HMI$TAG", "onDettachDev")
// close camera
if (isRequest) {
isRequest = false
mCameraHelper?.closeCamera()
showShortMsg(device.deviceName + " is out")
}
}
override fun onConnectDev(device: UsbDevice?, isConnected: Boolean) {
CallerLogger.d("$M_HMI$TAG", "onConnectDev:isConnected=$isConnected")
if (!isConnected) {
showShortMsg("fail to connect,please check resolution params")
isPreview = false
} else {
isPreview = true
showShortMsg("相机连接中")
// initialize seekbar
// need to wait UVCCamera initialize over
Thread {
try {
Thread.sleep(2500)
} catch (e: InterruptedException) {
e.printStackTrace()
}
Looper.prepare()
if (mCameraHelper != null && mCameraHelper!!.isCameraOpened) {
CallerLogger.d("$M_HMI$TAG", "亮度(brightness):${mCameraHelper!!.getModelValue(UVCCameraHelper.MODE_BRIGHTNESS)}")
CallerLogger.d("$M_HMI$TAG", "对比度(contrast):${mCameraHelper!!.getModelValue(UVCCameraHelper.MODE_CONTRAST)}")
}
Looper.loop()
}.start()
}
}
override fun onDisConnectDev(device: UsbDevice?) {
CallerLogger.d("$M_HMI$TAG", "onDisConnectDev")
showShortMsg("相机断开连接")
}
override fun onCancelDev(device: UsbDevice?) {
CallerLogger.d("$M_HMI$TAG", "onCancelDev" + device?.deviceName)
}
}
private fun showShortMsg(msg: String) {
//Toast.makeText(context, msg, Toast.LENGTH_SHORT).show()
}
private fun initView() {
// step.1 initialize UVCCameraHelper
carcorderPreview.setCallback(this)
mCameraHelper = UVCCameraHelper.getInstance()
mCameraHelper?.setDefaultFrameFormat(UVCCameraHelper.FRAME_FORMAT_MJPEG)
mCameraHelper?.initUSBMonitor(context as Activity, carcorderPreview, listener)
mCameraHelper?.setOnPreviewFrameListener { nv21Yuv ->
CallerLogger.d("$M_HMI$TAG", "onPreviewResult: " + nv21Yuv.size)
if (liveStreamManager != null) {
// 将摄像头采集的YUV数据推送到ZEGO
liveStreamManager!!.notifyYUVData(nv21Yuv, 640, 480, 2)
}
}
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
initView()
// step.2 register USB event broadcast
if (mCameraHelper != null) {
mCameraHelper!!.registerUSB()
}
// 初始化直播流管理
// 初始化直播流管理
liveStreamManager = LiveStreamManagerImpl.getInstance((context as Activity).application,
MoGoAiCloudClientConfig.getInstance().sn, true)
// 设置状态回调
liveStreamManager!!.setLiveStatusChangeCallback { status ->
if (status == 0) {
CallerLogger.d("$M_HMI$TAG", "直播中……")
} else {
CallerLogger.d("$M_HMI$TAG", "直播结束……")
}
}
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
// step.3 unregister USB event broadcast
if (mCameraHelper != null) {
mCameraHelper!!.unregisterUSB()
}
if (liveStreamManager != null) {
// 停止
liveStreamManager!!.stopLiveStream()
// 释放资源
liveStreamManager!!.release()
}
}
override fun onSurfaceCreated(view: CameraViewInterface?, surface: Surface?) {
if (!isPreview && mCameraHelper!!.isCameraOpened) {
mCameraHelper!!.startPreview(carcorderPreview)
isPreview = true
}
}
override fun onSurfaceChanged(view: CameraViewInterface?, surface: Surface?, width: Int, height: Int) {
}
override fun onSurfaceDestroy(view: CameraViewInterface?, surface: Surface?) {
if (isPreview && mCameraHelper!!.isCameraOpened) {
mCameraHelper!!.stopPreview()
isPreview = false
}
}
}

View File

@@ -0,0 +1,62 @@
package com.mogo.eagle.core.function.hmi.ui.dispatch;
import android.content.Context;
import android.text.TextUtils;
import android.widget.Button;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean;
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager;
import com.mogo.eagle.core.function.hmi.R;
public class DispatchAirportDialog extends DispatchBaseDialog {
private final TextView tvStartLoc;
private final TextView tvEndLoc;
private final TextView tvTaskTime;
private final TextView tvFlightInfo;
private final TextView tvTaskContent;
public DispatchAirportDialog(@NonNull Context context) {
super(context);
setContentView(R.layout.dialog_adas_dispatch_airport);
setCanceledOnTouchOutside(false);
tvStartLoc = findViewById(R.id.module_services_dispatch_dialog_start_content);
tvEndLoc = findViewById(R.id.module_services_dispatch_dialog_end_content);
tvTaskTime = findViewById(R.id.module_services_dispatch_dialog_task_time);
tvFlightInfo = findViewById(R.id.module_services_dispatch_dialog_flight_time);
tvTaskContent = findViewById(R.id.module_services_dispatch_dialog_task_content);
Button btnAffirm = findViewById(R.id.module_services_dispatch_dialog_confirm);
btnAffirm.setOnClickListener(v -> {
CallerFuncBizManager.getBizProvider().dispatchAffirm();
dismissDialog();
});
}
@Override
public void showDialog(DispatchAdasAutoPilotLocReceiverBean dispatchContent) {
show();
if (!TextUtils.isEmpty(dispatchContent.getStartLocAddress())) {
tvStartLoc.setText(dispatchContent.getStartLocAddress());
}
if (!TextUtils.isEmpty(dispatchContent.getEndLocAddress())) {
tvEndLoc.setText(dispatchContent.getEndLocAddress());
}
if (!TextUtils.isEmpty(dispatchContent.getTaskTime())) {
tvTaskTime.setText(dispatchContent.getTaskTime());
}
if (!TextUtils.isEmpty(dispatchContent.getFlightInfo())) {
tvFlightInfo.setText(dispatchContent.getFlightInfo());
}
if (!TextUtils.isEmpty(dispatchContent.getTaskInfo())) {
tvTaskContent.setText(dispatchContent.getTaskInfo());
}
}
private void dismissDialog() {
dismiss();
}
}

View File

@@ -0,0 +1,29 @@
package com.mogo.eagle.core.function.hmi.ui.dispatch;
import android.app.Dialog;
import android.content.Context;
import android.os.Build;
import android.view.WindowManager;
import androidx.annotation.NonNull;
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean;
import com.mogo.eagle.core.function.hmi.R;
public abstract class DispatchBaseDialog extends Dialog {
public DispatchBaseDialog(@NonNull Context context) {
super(context, R.style.Base_AlertDialog_AppCompat);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY);
} else {
getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
}
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
| WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE);
}
public abstract void showDialog(DispatchAdasAutoPilotLocReceiverBean dispatchContent);
}

View File

@@ -0,0 +1,80 @@
package com.mogo.eagle.core.function.hmi.ui.dispatch;
import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.widget.Button;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean;
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager;
import com.mogo.eagle.core.function.hmi.R;
public class DispatchCarsDialog extends DispatchBaseDialog {
private static final int MSG_TYPE_TIMER = 0;
private static int TIMER = 10;
private final TextView tvTimer;
private final TextView tvLoc;
private final Handler handler = new Handler() {
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
if (msg.what == MSG_TYPE_TIMER) {
if (TIMER > 0) {
TIMER--;
tvTimer.setText(String.valueOf(TIMER));
handler.sendEmptyMessageDelayed(MSG_TYPE_TIMER, 1000L);
} else {
hideDialog();
}
}
}
};
public DispatchCarsDialog(@NonNull Context context) {
super(context);
setContentView(R.layout.dialog_adas_dispatch_cars);
setCanceledOnTouchOutside(false);
tvTimer = findViewById(R.id.module_adas_dispatch_remind_timer);
tvLoc = findViewById(R.id.module_adas_dispatch_remind_loc);
Button btnAffirm = (Button) findViewById(R.id.module_adas_dispatch_remind_affirm);
Button btnCancel = (Button) findViewById(R.id.module_adas_dispatch_remind_cancel);
tvTimer.setText(String.valueOf(TIMER));
btnAffirm.setOnClickListener(v -> {
CallerFuncBizManager.getBizProvider().dispatchAffirm();
dismissDialog();
});
btnCancel.setOnClickListener(v -> {
CallerFuncBizManager.getBizProvider().dispatchCancel(true);
dismissDialog();
});
}
private void hideDialog() {
CallerFuncBizManager.getBizProvider().dispatchCancel(false);
dismissDialog();
}
private void dismissDialog() {
handler.removeMessages(MSG_TYPE_TIMER);
TIMER = 10;
dismiss();
}
@Override
public void showDialog(DispatchAdasAutoPilotLocReceiverBean dispatchContent) {
if (TextUtils.isEmpty(dispatchContent.getEndLocAddress())) {
return;
}
show();
handler.sendEmptyMessage(MSG_TYPE_TIMER);
tvLoc.setText(dispatchContent.getEndLocAddress());
}
}

View File

@@ -0,0 +1,95 @@
package com.mogo.eagle.core.function.hmi.ui.dispatch;
import static com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean.DISPATCH_SOURCE_EZHOU;
import static com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean.DISPATCH_SOURCE_HENGYANG;
import static com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean.DISPATCH_TYPE_START;
import static com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean.DISPATCH_TYPE_STOP;
import android.content.Context;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean;
public class DispatchDialogManager {
private static volatile DispatchDialogManager manager;
private static final byte[] obj = new byte[0];
private final Context mContext;
private DispatchBaseDialog dialog;
private DispatchDialogManager(Context context) {
mContext = context;
}
public static DispatchDialogManager getInstance(Context context) {
if (manager == null) {
synchronized (obj) {
if (manager == null) {
manager = new DispatchDialogManager(context);
}
}
}
return manager;
}
public boolean isShowing() {
return dialog != null && dialog.isShowing();
}
public void showDialog(DispatchAdasAutoPilotLocReceiverBean msgData) {
if (msgData == null) {
return;
}
switch (msgData.getSource()) {
case DISPATCH_SOURCE_HENGYANG:
dispatchHengYang(msgData);
break;
case DISPATCH_SOURCE_EZHOU:
dispatchEZhou(msgData);
break;
}
}
private void dispatchHengYang(DispatchAdasAutoPilotLocReceiverBean msgData) {
if (msgData.getType() == DISPATCH_TYPE_START) { //衡阳只有开始调度
if (dialog != null && dialog.isShowing()) { //避免下发两次
return;
}
if (dialog == null) {
dialog = new DispatchCarsDialog(mContext);
}
dialog.showDialog(msgData);
}
}
private void dispatchEZhou(DispatchAdasAutoPilotLocReceiverBean msgData) {
switch (msgData.getType()) {
case DISPATCH_TYPE_START:
if (dialog != null && dialog.isShowing()) { //避免下发两次
return;
}
if (dialog == null) {
dialog = new DispatchAirportDialog(mContext);
}
dialog.showDialog(msgData);
break;
case DISPATCH_TYPE_STOP:
//语音播报
voice();
break;
}
}
private void voice() {
AIAssist.getInstance(mContext).speakTTSVoiceWithLevel("请立即停车!请立即停车!",AIAssist.LEVEL0);
}
public void releaseDialog() {
if (dialog != null) {
if (dialog.isShowing()) {
dialog.dismiss();
}
dialog = null;
}
}
}

View File

@@ -0,0 +1,8 @@
package com.mogo.eagle.core.function.hmi.ui.dispatch;
public interface IDispatchRemindClickListener {
void affirm();
void cancel(boolean manualTrigger);
}

View File

@@ -14,6 +14,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData;
import com.mogo.eagle.core.function.hmi.R;
import com.mogo.eagle.core.function.hmi.ui.notice.traffic.NoticeTrafficDialog;
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp;
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform;
import com.mogo.eagle.core.utilcode.util.BitmapHelper;

View File

@@ -1,4 +1,4 @@
package com.mogo.eagle.core.function.hmi.ui.notice;
package com.mogo.eagle.core.function.hmi.ui.notice.traffic;
import android.content.Context;
import android.view.LayoutInflater;

View File

@@ -1,4 +1,4 @@
package com.mogo.eagle.core.function.hmi.ui.notice;
package com.mogo.eagle.core.function.hmi.ui.notice.traffic;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_HMI;
@@ -24,7 +24,7 @@ import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData;
import com.mogo.eagle.core.data.notice.NoticeValue;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.notice.CallerNoticeManager;
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager;
import com.mogo.eagle.core.function.hmi.R;
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp;
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform;
@@ -153,7 +153,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
* 0不接收 1接受 发起自动驾驶任务,显示引导线
*/
private void feedBackTraffic(int i) {
CallerNoticeManager.getNoticeProvider().feedBackNoticeTraffic(mPushData.getInfoId(), MoGoAiCloudClientConfig.getInstance().getSn(), i);
CallerFuncBizManager.getBizProvider().feedBackNoticeTraffic(mPushData.getInfoId(), MoGoAiCloudClientConfig.getInstance().getSn(), i);
if (i == 1) {
startAutoPilot();
}
@@ -352,7 +352,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
*/
private void requestTrafficInfo() {
CallerLogger.INSTANCE.d(M_HMI + TAG, "requestTrafficInfo");
CallerNoticeManager.getNoticeProvider().requestAccidentInfo(mPushData.getInfoId(), MoGoAiCloudClientConfig.getInstance().getSn(), trafficInfo -> {
CallerFuncBizManager.getBizProvider().requestAccidentInfo(mPushData.getInfoId(), MoGoAiCloudClientConfig.getInstance().getSn(), trafficInfo -> {
CallerLogger.INSTANCE.d(M_HMI + TAG, "交通事故详情::" + trafficInfo);
mTrafficStyleInfo = trafficInfo.getResult().getAccidentInfo();
infoRefresh(mTrafficStyleInfo);

View File

@@ -1,4 +1,4 @@
package com.mogo.eagle.core.function.hmi.ui.notice;
package com.mogo.eagle.core.function.hmi.ui.notice.traffic;
import android.content.Context;
import android.content.res.TypedArray;

View File

@@ -1,4 +1,4 @@
package com.mogo.eagle.core.function.hmi.ui.notice;
package com.mogo.eagle.core.function.hmi.ui.notice.traffic;
import android.content.Context;
import android.util.AttributeSet;

View File

@@ -10,7 +10,6 @@ import android.os.Process;
import androidx.annotation.Nullable;
import androidx.core.app.NotificationCompat;
import com.alibaba.android.arouter.launcher.ARouter;
import com.bytedance.boost_multidex.BoostMultiDex;
import com.elegant.utils.UiThreadHandler;
import com.mogo.cloud.socket.SocketBuildConfig;
@@ -18,11 +17,9 @@ import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.module.MogoModule;
import com.mogo.commons.module.MogoModulePaths;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.constants.MoGoConfig;
import com.mogo.eagle.core.data.constants.MogoServicePaths;
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
import com.mogo.eagle.core.function.api.chat.biz.ChatConsts;
import com.mogo.eagle.core.function.api.devatools.IMogoDevaToolsUpgradeListener;
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager;
@@ -237,11 +234,9 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
// 超视距,路测、行车记录仪监控
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AI_MONITORING, "IMoGoMonitoringProvider"));
// 云公告发布
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AI_NOTICE, "IMoGoNoticeProvider"));
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_FUNC_BIZ, "IMoGoNoticeProvider"));
// 车聊聊IM
MogoModulePaths.addModuleFunctionServer(new MogoModule(ChatConsts.CHAT_PROVIDER_PATH, ChatConsts.CHAT_MODULE_NAME));
// 调度
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_AI_DISPATCH, "IDispatchProvider"));
// V2X 模块
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_V2X_MODULE, "V2XProvider"));
// 绑定车辆

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/color_E63B4577" />
<corners android:radius="@dimen/module_services_dispatch_airport_dialog_corner" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/color_3E7BFE" />
<corners android:radius="@dimen/module_services_dispatch_airport_dialog_affirm_corner" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/module_services_dispatch_cars_dialog_corner"/>
<solid android:color="@color/color_E63B4577"/>
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:bottomLeftRadius="@dimen/module_services_dispatch_cars_dialog_corner"/>
<solid android:color="@color/color_E63B4577"/>
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:bottomRightRadius="@dimen/module_services_dispatch_cars_dialog_corner"/>
<solid android:color="@color/color_E63B4577"/>
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/color_E63B4577" />
<corners android:bottomLeftRadius="@dimen/module_services_dispatch_cars_dialog_corner" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/color_E63B4577" />
<corners android:bottomRightRadius="@dimen/module_services_dispatch_cars_dialog_corner" />
</shape>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<solid android:color="@color/color_4D000000"/>
</shape>

View File

@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/module_services_dispatch_airport_dialog_width"
android:layout_height="wrap_content"
android:background="@drawable/bg_adas_dispatch">
<TextView
android:id="@+id/module_services_dispatch_dialog_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/module_services_dispatch_airport_dialog_title_margin_top"
android:text="@string/dispatch_dialog_title"
android:textColor="@android:color/white"
android:textSize="@dimen/module_services_dispatch_airport_dialog_title_size"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/module_services_dispatch_airport_dialog_first_column_margin_left"
android:layout_marginTop="@dimen/module_services_dispatch_airport_dialog_startloc_margin_top"
android:text="@string/dispatch_dialog_start_loc"
android:textSize="@dimen/module_services_dispatch_airport_dialog_next_level_title_size" />
<TextView
android:id="@+id/module_services_dispatch_dialog_start_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/module_services_dispatch_airport_dialog_first_column_margin_left"
android:layout_marginTop="@dimen/module_services_dispatch_airport_dialog_startloc_content_margin_top"
android:textColor="@android:color/white"
android:textSize="@dimen/module_services_dispatch_airport_dialog_title_size"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/module_services_dispatch_airport_dialog_first_column_margin_left"
android:layout_marginTop="@dimen/module_services_dispatch_airport_dialog_endloc_margin_top"
android:text="@string/dispatch_dialog_end_loc"
android:textSize="@dimen/module_services_dispatch_airport_dialog_next_level_title_size" />
<TextView
android:id="@+id/module_services_dispatch_dialog_end_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/module_services_dispatch_airport_dialog_first_column_margin_left"
android:layout_marginTop="@dimen/module_services_dispatch_airport_dialog_endloc_content_margin_top"
android:textColor="@android:color/white"
android:textSize="@dimen/module_services_dispatch_airport_dialog_title_size"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/module_services_dispatch_airport_dialog_first_column_margin_left"
android:layout_marginTop="@dimen/module_services_dispatch_airport_dialog_task_margin_top"
android:text="@string/dispatch_dialog_task_info"
android:textSize="@dimen/module_services_dispatch_airport_dialog_next_level_title_size" />
<TextView
android:id="@+id/module_services_dispatch_dialog_task_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/module_services_dispatch_airport_dialog_first_column_margin_left"
android:layout_marginEnd="@dimen/module_services_dispatch_airport_dialog_first_column_margin_left"
android:layout_marginTop="@dimen/module_services_dispatch_airport_dialog_task_content_margin_top"
android:textColor="@android:color/white"
android:textSize="@dimen/module_services_dispatch_airport_dialog_task_content_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/module_services_dispatch_airport_dialog_last_column_margin_left"
android:layout_marginTop="@dimen/module_services_dispatch_airport_dialog_startloc_margin_top"
android:text="@string/dispatch_dialog_task_time"
android:textSize="@dimen/module_services_dispatch_airport_dialog_next_level_title_size" />
<TextView
android:id="@+id/module_services_dispatch_dialog_task_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/module_services_dispatch_airport_dialog_last_column_margin_left"
android:layout_marginTop="@dimen/module_services_dispatch_airport_dialog_startloc_content_margin_top"
android:textColor="@android:color/white"
android:textSize="@dimen/module_services_dispatch_airport_dialog_title_size"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/module_services_dispatch_airport_dialog_last_column_margin_left"
android:layout_marginTop="@dimen/module_services_dispatch_airport_dialog_endloc_margin_top"
android:text="@string/dispatch_dialog_flight_info"
android:textSize="@dimen/module_services_dispatch_airport_dialog_next_level_title_size" />
<TextView
android:id="@+id/module_services_dispatch_dialog_flight_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/module_services_dispatch_airport_dialog_last_column_margin_left"
android:layout_marginTop="@dimen/module_services_dispatch_airport_dialog_endloc_content_margin_top"
android:textColor="@android:color/white"
android:textSize="@dimen/module_services_dispatch_airport_dialog_title_size"
android:textStyle="bold" />
<Button
android:id="@+id/module_services_dispatch_dialog_confirm"
android:layout_width="@dimen/module_services_dispatch_airport_dialog_affirm_width"
android:layout_height="@dimen/module_services_dispatch_airport_dialog_affirm_height"
android:layout_below="@+id/module_services_dispatch_dialog_task_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/module_services_dispatch_airport_dialog_margin_top"
android:layout_marginBottom="@dimen/module_services_dispatch_airport_dialog_margin_bottom"
android:background="@drawable/bg_adas_dispatch_affirm"
android:gravity="center"
android:text="@string/dispatch_dialog_affirm"
android:textColor="@android:color/white"
android:textSize="@dimen/module_services_dispatch_airport_dialog_title_size"
android:textStyle="bold" />
</RelativeLayout>

View File

@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="@dimen/module_services_dispatch_cars_dialog_width"
android:layout_height="@dimen/module_services_dispatch_cars_dialog_height"
android:background="@drawable/bg_dispatch_cars">
<TextView
android:id="@+id/module_adas_dispatch_remind_timer"
android:layout_width="@dimen/module_services_dispatch_cars_dialog_timer_size"
android:layout_height="@dimen/module_services_dispatch_cars_dialog_timer_size"
android:layout_margin="@dimen/module_services_dispatch_cars_dialog_timer_margin"
android:background="@drawable/bg_dispatch_timer"
android:gravity="center"
android:text="10"
android:textColor="@color/color_8E9DD4"
android:textSize="@dimen/module_services_dispatch_cars_dialog_timer_txt_size"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/module_services_dispatch_cars_dialog_title_margin_top"
android:text="@string/dispatch_cars_remind_title"
android:textColor="@android:color/white"
android:textSize="@dimen/module_services_dispatch_cars_dialog_title_size"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/module_services_dispatch_cars_dialog_content_margin_top"
android:text="@string/dispatch_cars_remind_content"
android:textColor="@android:color/white"
android:textSize="@dimen/module_services_dispatch_cars_dialog_content_size"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/module_adas_dispatch_remind_loc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/module_services_dispatch_cars_dialog_loc_margin_top"
android:maxLines="1"
android:textColor="@color/color_1F9BFE"
android:textSize="@dimen/module_services_dispatch_cars_dialog_loc_size"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color_66B8BFE8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@+id/module_adas_dispatch_remind_affirm"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<Button
android:id="@+id/module_adas_dispatch_remind_affirm"
android:layout_width="@dimen/module_services_dispatch_cars_dialog_btn_width"
android:layout_height="@dimen/module_services_dispatch_cars_dialog_line_margin_bottom"
android:gravity="center"
android:background="@drawable/bg_dispatch_left_corner"
android:text="@string/dispatch_cars_affirm"
android:textColor="@color/color_1F9BFE"
android:textSize="@dimen/module_services_dispatch_cars_dialog_title_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
<View
android:layout_width="2dp"
android:layout_height="@dimen/module_services_dispatch_cars_dialog_line_margin_bottom"
android:layout_marginStart="@dimen/module_services_dispatch_cars_dialog_btn_width"
android:background="@color/color_66B8BFE8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
<Button
android:id="@+id/module_adas_dispatch_remind_cancel"
android:layout_width="@dimen/module_services_dispatch_cars_dialog_btn_width"
android:layout_height="@dimen/module_services_dispatch_cars_dialog_line_margin_bottom"
android:gravity="center"
android:text="@string/dispatch_cars_cancel"
android:textColor="@color/color_AFB3C7"
android:background="@drawable/bg_dispatch_right_corner"
android:textSize="@dimen/module_services_dispatch_cars_dialog_title_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="@dimen/dp_768"
android:layout_height="@dimen/dp_432">
<com.serenegiant.usb.widget.UVCCameraTextureView
android:id="@+id/carcorderPreview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -43,6 +43,13 @@
<color name="color_FFA7B6F0">#FFA7B6F0</color>
<color name="color_B3FFFFFF">#B3FFFFFF</color>
<color name="color_99000000">#99000000</color>
<color name="color_E63B4577">#E63B4577</color>
<color name="color_3E7BFE">#3E7BFE</color>
<color name="color_1F9BFE">#1F9BFE</color>
<color name="color_8E9DD4">#8E9DD4</color>
<color name="color_4D000000">#4D000000</color>
<color name="color_66B8BFE8">#66B8BFE8</color>
<color name="color_AFB3C7">#AFB3C7</color>
<color name="version_latest_start_color">#6D7BAF</color>
@@ -74,4 +81,7 @@
<color name="hmi_check_keyboard_input_field">#FF282F62</color>
<color name="bus_autopilot_text_color_normal">#FFFFFF</color>
</resources>

View File

@@ -76,4 +76,40 @@
<dimen name="hmi_take_over_request_width">810dp</dimen>
<dimen name="hmi_take_over_request_height">560dp</dimen>
<dimen name="hmi_take_over_request_m_top">524dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_width">1263dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_height">1173dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_corner">32dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_next_level_title_size">38dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_title_size">48dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_task_content_size">42dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_title_margin_top">55dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_startloc_margin_top">219dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_startloc_content_margin_top">288dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_endloc_margin_top">415dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_endloc_content_margin_top">484dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_task_margin_top">621dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_task_content_margin_top">690dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_first_column_margin_left">100dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_last_column_margin_left">852dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_margin_top">86dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_margin_bottom">80dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_affirm_width">700dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_affirm_height">140dp</dimen>
<dimen name="module_services_dispatch_airport_dialog_affirm_corner">70dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_width">950dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_height">540dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_corner">32dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_title_size">48dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_title_margin_top">55dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_content_size">38dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_content_margin_top">179dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_loc_size">54dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_loc_margin_top">251dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_line_margin_bottom">152dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_btn_width">474.5dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_timer_margin">20dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_timer_size">46dp</dimen>
<dimen name="module_services_dispatch_cars_dialog_timer_txt_size">24dp</dimen>
</resources>

View File

@@ -53,4 +53,16 @@
<string name="to_binding_car">是否绑定车机?</string>
<string name="status_bar_tag">蘑菇星云</string>
<string name="dispatch_dialog_title">您有新的工作任务</string>
<string name="dispatch_dialog_start_loc">开始地点:</string>
<string name="dispatch_dialog_end_loc">结束地点:</string>
<string name="dispatch_dialog_task_time">任务时间:</string>
<string name="dispatch_dialog_task_info">任务内容:</string>
<string name="dispatch_dialog_flight_info">航班信息:</string>
<string name="dispatch_dialog_affirm">接受任务</string>
<string name="dispatch_cars_remind_title">调度确认</string>
<string name="dispatch_cars_remind_content">车辆将开启自动驾驶,并行驶至:</string>
<string name="dispatch_cars_affirm">确认</string>
<string name="dispatch_cars_cancel">取消</string>
</resources>

View File

@@ -89,4 +89,19 @@
<item name="android:layout_margin">@dimen/dp_10</item>
</style>
<style name="BaseFloatDialogStyle" parent="@android:style/Theme.Dialog">
<item name="android:windowIsFloating">true</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:backgroundDimAmount">0.6</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:fullBright">@android:color/transparent</item>
<item name="android:fullDark">@android:color/transparent</item>
<item name="android:topBright">@android:color/transparent</item>
<item name="android:topDark">@android:color/transparent</item>
<item name="android:borderlessButtonStyle">@android:color/transparent</item>
</style>
</resources>