From 044076bf297290f80cfe6507c7882c34621df164 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Tue, 29 Mar 2022 19:22:41 +0800 Subject: [PATCH] =?UTF-8?q?[Delete]=20=E5=88=A0=E9=99=A4=E5=BA=9F=E5=BC=83?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../function/v2x/events/V2XEventManager.kt | 7 +- .../v2x/events/marker/V2XMarkerAdapter.java | 2 - .../receiver/TestPanelBroadcastReceiver.java | 37 +-- .../function/v2x/events/utils/ADASUtils.java | 78 ----- .../v2x/events/utils/TestOnLineCarUtils.java | 200 +----------- ...odule_event_panel_fragment_surrounding.xml | 158 --------- ...module_fragment_surrounding_event_item.xml | 62 ---- ...e_v2x_event_panel_fragment_event_panel.xml | 138 -------- ..._event_panel_fragment_scenario_history.xml | 43 --- .../module_v2x_event_share_description.xml | 129 -------- .../layout/module_v2x_event_share_empty.xml | 68 ---- .../layout/module_v2x_event_share_item.xml | 102 ------ .../module_v2x_event_share_recylerview.xml | 25 -- ...dule_v2x_event_surrounding_detail_item.xml | 92 ------ .../res/layout/v2x_front_target_info_view.xml | 20 -- .../res/layout/v2x_road_front_warning_vr.xml | 42 --- .../drawer/marker/AheadCollisionView.java | 42 --- .../marker/AheadCollisionWindow3DAdapter.java | 26 -- .../common/entity/RoadTrafficSegment.java | 38 --- .../common/entity/RoadTrafficStatus.java | 113 ------- .../common/entity/UploadTrafficEntity.java | 26 -- .../common/entity/V2XEventShowEntity.java | 144 --------- .../common/entity/V2XObuEventEntity.java | 35 -- .../common/entity/V2XPushMessageEntity.java | 301 ------------------ .../entity/V2XRecommendRouteEntity.java | 39 --- .../mogo/module/common/enums/EventTypeEnum.kt | 41 --- .../com/mogo/module/common/utils/Const.java | 43 --- .../module/common/view/MarkerBaseFloor.java | 40 --- .../module_common_warning_marker_bottom.xml | 12 - .../module_common_warning_marker_front.xml | 12 - 30 files changed, 7 insertions(+), 2108 deletions(-) delete mode 100644 core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/ADASUtils.java delete mode 100644 core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_event_panel_fragment_surrounding.xml delete mode 100644 core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_fragment_surrounding_event_item.xml delete mode 100644 core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_panel_fragment_event_panel.xml delete mode 100644 core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_panel_fragment_scenario_history.xml delete mode 100644 core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_description.xml delete mode 100644 core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_empty.xml delete mode 100644 core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_item.xml delete mode 100644 core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_recylerview.xml delete mode 100644 core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_surrounding_detail_item.xml delete mode 100644 core/function-impl/mogo-core-function-v2x/src/main/res/layout/v2x_front_target_info_view.xml delete mode 100644 core/function-impl/mogo-core-function-v2x/src/main/res/layout/v2x_road_front_warning_vr.xml delete mode 100644 modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/AheadCollisionView.java delete mode 100644 modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/AheadCollisionWindow3DAdapter.java delete mode 100644 modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/RoadTrafficSegment.java delete mode 100644 modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/RoadTrafficStatus.java delete mode 100644 modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/UploadTrafficEntity.java delete mode 100644 modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XEventShowEntity.java delete mode 100644 modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XObuEventEntity.java delete mode 100644 modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XPushMessageEntity.java delete mode 100644 modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XRecommendRouteEntity.java delete mode 100644 modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/Const.java delete mode 100644 modules/mogo-module-common/src/main/java/com/mogo/module/common/view/MarkerBaseFloor.java delete mode 100644 modules/mogo-module-common/src/main/res/layout/module_common_warning_marker_bottom.xml delete mode 100644 modules/mogo-module-common/src/main/res/layout/module_common_warning_marker_front.xml diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt index f226543685..4635c439f9 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/V2XEventManager.kt @@ -6,7 +6,6 @@ import android.content.IntentFilter import android.os.Handler import android.os.Looper import android.provider.Settings.System -import android.util.Log import androidx.localbroadcastmanager.content.LocalBroadcastManager import com.mogo.cloud.passport.IMoGoTokenCallback import com.mogo.cloud.passport.MoGoAiCloudClient @@ -29,6 +28,7 @@ import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooC import com.mogo.eagle.core.function.v2x.events.alarm.V2XAlarmServer import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.context +import com.mogo.eagle.core.function.v2x.events.consts.V2XConst import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.BROADCAST_SCENE_EXTRA_KEY import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.BROADCAST_SCENE_HANDLER_ACTION import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME @@ -56,7 +56,6 @@ import com.mogo.module.common.entity.* import com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum import com.mogo.module.common.enums.EventTypeEnum import com.mogo.module.common.enums.EventTypeEnum.FOURS_BLOCK_UP -import com.mogo.module.common.utils.Const import com.mogo.service.statusmanager.IMogoStatusChangedListener import com.mogo.service.statusmanager.StatusDescriptor import com.mogo.service.statusmanager.StatusDescriptor.ACC_STATUS @@ -209,8 +208,8 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb v2XMessageEntity.isOnlyShow = true v2XMessageEntity.isNeedAddLine = false v2XMessageEntity.content = roadEventEntity - val intent = Intent(Const.BROADCAST_SCENE_HANDLER_ACTION) - intent.putExtra(Const.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity) + val intent = Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION) + intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity) LocalBroadcastManager.getInstance(context()).sendBroadcast(intent) //埋点 TrackUtils.trackV2XMarkerClick(2) diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/V2XMarkerAdapter.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/V2XMarkerAdapter.java index 9dd9aa906c..3c8ae23d36 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/V2XMarkerAdapter.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/V2XMarkerAdapter.java @@ -4,9 +4,7 @@ import android.content.Context; import android.graphics.Bitmap; import com.mogo.eagle.core.function.v2x.R; -import com.mogo.eagle.core.utilcode.util.Utils; import com.mogo.module.common.entity.MarkerShowEntity; -import com.mogo.module.common.entity.V2XPushMessageEntity; import com.mogo.module.common.entity.V2XRoadEventEntity; import com.mogo.module.common.enums.EventTypeEnum; diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/TestPanelBroadcastReceiver.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/TestPanelBroadcastReceiver.java index ddfaf59c45..c46a63790a 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/TestPanelBroadcastReceiver.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/TestPanelBroadcastReceiver.java @@ -5,6 +5,7 @@ import android.content.Context; import android.content.Intent; import androidx.localbroadcastmanager.content.LocalBroadcastManager; + import com.mogo.eagle.core.data.map.MogoLatLng; import com.mogo.eagle.core.function.call.chat.CallerChatManager; import com.mogo.eagle.core.function.call.map.CallerSmpManager; @@ -17,9 +18,9 @@ import com.mogo.eagle.core.function.v2x.events.utils.V2XSQLiteUtils; import com.mogo.eagle.core.utilcode.util.Utils; import com.mogo.module.common.entity.MarkerExploreWay; import com.mogo.module.common.entity.V2XMessageEntity; -import com.mogo.module.common.entity.V2XPushMessageEntity; import com.mogo.module.common.entity.V2XRoadEventEntity; import com.mogo.service.statusmanager.IMogoStatusManager; + import java.util.List; /** @@ -65,38 +66,6 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver { // 存储本地,出行动态作展示 saveLocalStory(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING, v2XMessageEntity.getContent().getNoveltyInfo()); - } else if (sceneType == 3) {//触发H5推送事件 - V2XMessageEntity v2XMessageEntity = - TestOnLineCarUtils.getV2XScenarioPushEventData(); - - Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); - intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); - LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); - } else if (sceneType == 4) {//触发H5推送直播事件 - V2XMessageEntity v2XMessageEntity = - TestOnLineCarUtils.getV2XScenarioPushLiveEventData(); - - Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); - intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); - LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); - } else if (sceneType == 5) {//H5推送触发V2X动画 - V2XMessageEntity v2XMessageEntity = - TestOnLineCarUtils.getV2XScenarioAnimationEventData(); - - Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); - intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); - LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); - } else if (sceneType == 6) {//查看前车直播 - //V2XVoiceCallLiveBiz.getInstance().getFrontCarLive(); - } else if (sceneType == 7) {//查看前方路口直播 - //V2XVoiceCallLiveBiz.getInstance().getOpenRoadCameraLive(); - } else if (sceneType == 8) {//触发疲劳驾驶 - V2XMessageEntity v2XMessageEntity = - TestOnLineCarUtils.getV2XScenarioFatigueDrivingData(); - - Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION); - intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity); - LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); } else if (sceneType == 9) {//触发他人发起道路求助事件 V2XMessageEntity> v2XMessageEntity = TestOnLineCarUtils.getV2XScenarioSeekHelpData(); @@ -137,7 +106,7 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver { V2XRefreshModel model = BridgeApi.INSTANCE.refreshModel(); model. V2XServiceManager.getV2XRefreshModel().queryRoadData("F803EB2046PZD00149"); - } */else if (sceneType == 17) {//最优路线推荐 + } */ else if (sceneType == 17) {//最优路线推荐 V2XMessageEntity v2XMessageEntity = TestOnLineCarUtils.getV2XOptimalRoute(); diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/ADASUtils.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/ADASUtils.java deleted file mode 100644 index 981deadb3d..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/ADASUtils.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.mogo.eagle.core.function.v2x.events.utils; - -import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X; - -import android.content.Context; -import android.content.Intent; -import android.text.TextUtils; - -import androidx.annotation.Nullable; - -import com.mogo.commons.voice.AIAssist; -import com.mogo.commons.voice.IMogoVoiceCmdCallBack; -import com.mogo.commons.voice.VoicePreemptType; -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; -import com.mogo.eagle.core.utilcode.util.AppUtils; -import com.mogo.eagle.core.utilcode.util.Utils; -import com.mogo.module.common.entity.V2XPushMessageEntity; -import com.mogo.module.common.entity.V2XRoadEventEntity; - -/** - * author : donghongyu - * e-mail : 1358506549@qq.com - * date : 2020/4/3 6:54 PM - * desc : - * version: 1.0 - */ -public class ADASUtils { - /** - * 广播给ADAS进行展示 - * - * @param v2XRoadEventEntity 广播信息 - */ - public static void broadcastToADAS(Context context, V2XRoadEventEntity v2XRoadEventEntity) { - try { - V2XPushMessageEntity v2XAlarmMessage = new V2XPushMessageEntity(); - v2XAlarmMessage.setTts(v2XRoadEventEntity.getTts()); - v2XAlarmMessage.setAlarmContent(v2XRoadEventEntity.getAlarmContent()); - v2XAlarmMessage.setExpireTime(v2XRoadEventEntity.getExpireTime()); - v2XAlarmMessage.setSceneId(v2XRoadEventEntity.getPoiType()); - - broadcastToADAS(context, v2XAlarmMessage); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * 广播给ADAS进行展示 - * - * @param alarmMessage 广播信息 - */ - public static void broadcastToADAS(Context context, V2XPushMessageEntity alarmMessage) { - try { - Intent intent = new Intent("com.mogo.launcher.v2x"); - intent.putExtra("v2x_warning_type", alarmMessage.getSceneId()); - intent.putExtra("v2x_warning_timeout", alarmMessage.getExpireTime()); - intent.putExtra("v2x_warning_tts", alarmMessage.getTts()); - intent.putExtra("v2x_warning_info", alarmMessage.getAlarmContent()); - context.sendBroadcast(intent); - - // 这里是兼容 1+16G 版本没有ADAS的时候自身进行TTS - if (!AppUtils.isAppInstalled(context, "com.zhidao.autopilot")) { - speakTTSVoice(alarmMessage.getTts(), null); - } - - CallerLogger.INSTANCE.i(M_V2X + "ADASUtils", "向ADAS分发服务器下发的事件," + alarmMessage.toString()); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public static void speakTTSVoice(@Nullable String msg, IMogoVoiceCmdCallBack callBack) { - if (!TextUtils.isEmpty(msg)) { - CallerLogger.INSTANCE.w(M_V2X + "ADASUtils", "调用TTS播放语音:" + msg); - AIAssist.getInstance(Utils.getApp()).speakTTSVoice(msg, VoicePreemptType.PREEMPT_TYPE_IMMEADIATELY, callBack); - } - } -} diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TestOnLineCarUtils.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TestOnLineCarUtils.java index 8267396b79..5d24b5e4d8 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TestOnLineCarUtils.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/TestOnLineCarUtils.java @@ -9,9 +9,9 @@ import com.mogo.eagle.core.utilcode.util.Utils; import com.mogo.module.common.entity.MarkerExploreWay; import com.mogo.module.common.entity.MarkerResponse; import com.mogo.module.common.entity.V2XMessageEntity; -import com.mogo.module.common.entity.V2XPushMessageEntity; import com.mogo.module.common.entity.V2XRoadEventEntity; import com.mogo.module.common.entity.V2XWarningEntity; + import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.util.List; @@ -126,39 +126,6 @@ public class TestOnLineCarUtils { return null; } - /** - * 模拟H5推送数据 - */ - public static V2XMessageEntity getV2XScenarioPushEventData() { - try { - InputStream inputStream = Utils.getApp() - .getResources() - .openRawResource(R.raw.scenario_push_event_data); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - int len = -1; - byte[] buffer = new byte[1024]; - while ((len = inputStream.read(buffer)) != -1) { - baos.write(buffer, 0, len); - } - inputStream.close(); - - // 加载数据源 - V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class); - - V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); - // 控制类型 - v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_WINDOW_WARNING); - // 设置数据 - v2xMessageEntity.setContent(v2xRoadEventEntity); - // 控制展示状态 - v2xMessageEntity.setShowState(true); - return v2xMessageEntity; - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - /** * 测试数据 */ @@ -198,138 +165,6 @@ public class TestOnLineCarUtils { return null; } - /** - * 模拟H5推送直播数据 - */ - public static V2XMessageEntity getV2XScenarioPushLiveEventData() { - try { - InputStream inputStream = Utils.getApp() - .getResources() - .openRawResource(R.raw.scenario_push_live_event_data); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - int len = -1; - byte[] buffer = new byte[1024]; - while ((len = inputStream.read(buffer)) != -1) { - baos.write(buffer, 0, len); - } - inputStream.close(); - - // 加载数据源 - V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class); - - V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); - // 控制类型 - v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_LIVE_CAR_WARNING); - // 设置数据 - v2xMessageEntity.setContent(v2xRoadEventEntity); - // 控制展示状态 - v2xMessageEntity.setShowState(true); - return v2xMessageEntity; - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - /** - * 模拟H5推送场景动画数据 - */ - public static V2XMessageEntity getV2XScenarioAnimationEventData() { - try { - InputStream inputStream = Utils.getApp() - .getResources() - .openRawResource(R.raw.scenario_push_animation_event_data); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - int len = -1; - byte[] buffer = new byte[1024]; - while ((len = inputStream.read(buffer)) != -1) { - baos.write(buffer, 0, len); - } - inputStream.close(); - - // 加载数据源 - V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class); - - V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); - // 控制类型 - v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_ANIMATION_WARNING); - // 设置数据 - v2xMessageEntity.setContent(v2xRoadEventEntity); - // 控制展示状态 - v2xMessageEntity.setShowState(true); - return v2xMessageEntity; - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - /** - * 模拟H5推送场景--十字路口碰撞 - */ - public static V2XMessageEntity getV2XScenarioCrossCrash() { - try { - InputStream inputStream = Utils.getApp() - .getResources() - .openRawResource(R.raw.scenario_push_cross_crash); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - int len = -1; - byte[] buffer = new byte[1024]; - while ((len = inputStream.read(buffer)) != -1) { - baos.write(buffer, 0, len); - } - inputStream.close(); - - // 加载数据源 - V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class); - - V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); - // 控制类型 - v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_ANIMATION_WARNING); - // 设置数据 - v2xMessageEntity.setContent(v2xRoadEventEntity); - // 控制展示状态 - v2xMessageEntity.setShowState(true); - return v2xMessageEntity; - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - /** - * 模拟 疲劳驾驶 - */ - public static V2XMessageEntity getV2XScenarioFatigueDrivingData() { - try { - InputStream inputStream = Utils.getApp() - .getResources() - .openRawResource(R.raw.scenario_fatigue_driving_data); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - int len = -1; - byte[] buffer = new byte[1024]; - while ((len = inputStream.read(buffer)) != -1) { - baos.write(buffer, 0, len); - } - inputStream.close(); - - // 加载数据源 - V2XPushMessageEntity v2xRoadEventEntity = - GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class); - - V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); - // 控制类型 - v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_FATIGUE_DRIVING); - // 设置数据 - v2xMessageEntity.setContent(v2xRoadEventEntity); - // 控制展示状态 - v2xMessageEntity.setShowState(true); - return v2xMessageEntity; - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } /** * 模拟 道路求助 @@ -399,39 +234,6 @@ public class TestOnLineCarUtils { return null; } - /** - * 逆向车辆路线预判 - */ - public static V2XMessageEntity getV2XScenarionVRReverseCarData() { - try { - InputStream inputStream = Utils.getApp() - .getResources() - .openRawResource(R.raw.scenario_push_vr_reverse_car_data); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - int len = -1; - byte[] buffer = new byte[1024]; - while ((len = inputStream.read(buffer)) != -1) { - baos.write(buffer, 0, len); - } - inputStream.close(); - - // 加载数据源 - V2XPushMessageEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XPushMessageEntity.class); - - V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>(); - // 控制类型 - v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_VR_SHOW); - // 设置数据 - v2xMessageEntity.setContent(v2xRoadEventEntity); - // 控制展示状态 - v2xMessageEntity.setShowState(true); - return v2xMessageEntity; - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - /** * 模拟最优路线推送 diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_event_panel_fragment_surrounding.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_event_panel_fragment_surrounding.xml deleted file mode 100644 index b9b2ecf8f1..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_event_panel_fragment_surrounding.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_fragment_surrounding_event_item.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_fragment_surrounding_event_item.xml deleted file mode 100644 index 0467c01569..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_fragment_surrounding_event_item.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_panel_fragment_event_panel.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_panel_fragment_event_panel.xml deleted file mode 100644 index 2834ed9e76..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_panel_fragment_event_panel.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_panel_fragment_scenario_history.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_panel_fragment_scenario_history.xml deleted file mode 100644 index 9566dc7690..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_panel_fragment_scenario_history.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_description.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_description.xml deleted file mode 100644 index b0281ff0a3..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_description.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_empty.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_empty.xml deleted file mode 100644 index b8d06d3216..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_empty.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_item.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_item.xml deleted file mode 100644 index aaa1eba0c2..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_item.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_recylerview.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_recylerview.xml deleted file mode 100644 index 7d49939886..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_share_recylerview.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_surrounding_detail_item.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_surrounding_detail_item.xml deleted file mode 100644 index 06b6e32a09..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/module_v2x_event_surrounding_detail_item.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/v2x_front_target_info_view.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/v2x_front_target_info_view.xml deleted file mode 100644 index bfae7c37fb..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/v2x_front_target_info_view.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/v2x_road_front_warning_vr.xml b/core/function-impl/mogo-core-function-v2x/src/main/res/layout/v2x_road_front_warning_vr.xml deleted file mode 100644 index 935332e7e5..0000000000 --- a/core/function-impl/mogo-core-function-v2x/src/main/res/layout/v2x_road_front_warning_vr.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/AheadCollisionView.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/AheadCollisionView.java deleted file mode 100644 index 2fae8cf660..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/AheadCollisionView.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.mogo.module.common.drawer.marker; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.LayoutInflater; -import android.widget.ImageView; - -import androidx.annotation.Nullable; - -import com.mogo.map.marker.MogoMarkerOptions; -import com.mogo.module.common.R; -import com.mogo.module.common.entity.MarkerShowEntity; - -/** - * author : 李小鹏 - * desc : 地图2dMarker 在3d下的展示 - * 前方碰撞 - */ -public class AheadCollisionView extends MapMarkerBaseView { - public AheadCollisionView(Context context) { - super(context); - } - - public AheadCollisionView(Context context, @Nullable AttributeSet attrs) { - super(context, attrs); - } - - public AheadCollisionView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - @Override - protected void initView(Context context) { - LayoutInflater.from(context).inflate(R.layout.module_common_warning_marker_front, this); - } - - @Override - public void updateView(MarkerShowEntity markerShowEntity) { - - } - -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/AheadCollisionWindow3DAdapter.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/AheadCollisionWindow3DAdapter.java deleted file mode 100644 index 5e0df863ca..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/AheadCollisionWindow3DAdapter.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.mogo.module.common.drawer.marker; - -import android.content.Context; -import android.view.View; - -import com.mogo.map.marker.IMogoInfoWindowAdapter; -import com.mogo.map.marker.IMogoMarker; -import com.mogo.map.marker.MogoMarkerOptions; - -/** - * @author lixiaopeng - * @since 2021/4/15 - * 描述 前方碰撞预警marker - */ -public class AheadCollisionWindow3DAdapter implements IMogoInfoWindowAdapter { - private Context mContext; - - public AheadCollisionWindow3DAdapter(Context context) { - this.mContext = context; - } - - @Override - public View getInfoWindow(IMogoMarker marker) { - return new AheadCollisionView(mContext); - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/RoadTrafficSegment.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/RoadTrafficSegment.java deleted file mode 100644 index 16044abb6d..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/RoadTrafficSegment.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.mogo.module.common.entity; - -import com.mogo.eagle.core.data.map.MogoLatLng; - -import java.util.List; - -public class RoadTrafficSegment { - - //道路拥堵信息分级 - private int status; - - //分段道路拥堵经纬度点 - private List mogoLatLngList; - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public List getMogoLatLngList() { - return mogoLatLngList; - } - - public void setMogoLatLngList(List mogoLatLngList) { - this.mogoLatLngList = mogoLatLngList; - } - - @Override - public String toString() { - return "RoadTrafficSegment{" + - "status=" + status + - ", mogoLatLngList=" + mogoLatLngList + - '}'; - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/RoadTrafficStatus.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/RoadTrafficStatus.java deleted file mode 100644 index 01491454e3..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/RoadTrafficStatus.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.mogo.module.common.entity; - -import com.mogo.eagle.core.data.map.MogoLatLng; - -import java.util.List; - -/** - * 交通路况信息 - */ -public class RoadTrafficStatus { - - //角度 - private int angle; - - //行车信息描述 - private String direction; - - //道路名称 - private String roadName; - - //道路拥堵信息分级 - private int status; - - //道路拥堵长度 - private int length; - - //整条道路拥堵经纬度点 - private List mogoLatLngList; - - //是否存在道路分段数据 - private boolean segment; - - //分段道路数据 - private List roadTrafficSegmentList; - - public int getAngle() { - return angle; - } - - public void setAngle(int angle) { - this.angle = angle; - } - - public String getDirection() { - return direction; - } - - public void setDirection(String direction) { - this.direction = direction; - } - - public String getRoadName() { - return roadName; - } - - public void setRoadName(String roadName) { - this.roadName = roadName; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public int getLength() { - return length; - } - - public void setLength(int length) { - this.length = length; - } - - public List getMogoLatLngList() { - return mogoLatLngList; - } - - public void setMogoLatLngList(List mogoLatLngList) { - this.mogoLatLngList = mogoLatLngList; - } - - public boolean isSegment() { - return segment; - } - - public void setSegment(boolean segment) { - this.segment = segment; - } - - public List getRoadTrafficSegmentList() { - return roadTrafficSegmentList; - } - - public void setRoadTrafficSegmentList(List roadTrafficSegmentList) { - this.roadTrafficSegmentList = roadTrafficSegmentList; - } - - @Override - public String toString() { - return "RoadTrafficStatus{" + - "angle=" + angle + - ", direction='" + direction + '\'' + - ", roadName='" + roadName + '\'' + - ", status=" + status + - ", length=" + length + - ", mogoLatLngList=" + mogoLatLngList + - ", segment=" + segment + - ", roadTrafficSegmentList=" + roadTrafficSegmentList + - '}'; - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/UploadTrafficEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/UploadTrafficEntity.java deleted file mode 100644 index 611c61356c..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/UploadTrafficEntity.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.mogo.module.common.entity; - -import java.util.List; - -/** - * 上报路况服务Entity - */ -public class UploadTrafficEntity { - - private List roadTrafficStatuses; - - public List getRoadTrafficStatuses() { - return roadTrafficStatuses; - } - - public void setRoadTrafficStatuses(List roadTrafficStatuses) { - this.roadTrafficStatuses = roadTrafficStatuses; - } - - @Override - public String toString() { - return "UploadTrafficEntity{" + - "roadTrafficStatuses=" + roadTrafficStatuses + - '}'; - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XEventShowEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XEventShowEntity.java deleted file mode 100644 index 636e4ea87a..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XEventShowEntity.java +++ /dev/null @@ -1,144 +0,0 @@ -package com.mogo.module.common.entity; - - -import androidx.annotation.IntDef; - -import java.io.Serializable; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.util.List; -import java.util.Objects; - -/** - * author : donghongyu - * e-mail : 1358506549@qq.com - * date : 2020/3/11 4:25 PM - * desc : V2X事件列表展示 - * version: 1.0 - */ -public class V2XEventShowEntity implements Serializable { - - // 0---默认展示详情,1--直播, - @ViewType - private int viewType; - - // 道路事件详情 - private V2XRoadEventEntity v2XRoadEventEntity; - // 直播车机 @see viewType = 1 - private V2XLiveCarInfoEntity v2XLiveCarInfoRes; - // 直播车机列表 - private List v2XLiveCarList; - // 推送信息,疲劳驾驶,他人发起故障求助 - private V2XPushMessageEntity v2XPushMessageEntity; - // 违章停车 - private MarkerExploreWay v2XIllegalPark; - - // 基于目的地道路推荐详情 - private V2XRecommendRouteEntity v2XRecommendRouteEntity; - - public int getViewType() { - return viewType; - } - - public void setViewType(int viewType) { - this.viewType = viewType; - } - - public V2XRoadEventEntity getV2XRoadEventEntity() { - return v2XRoadEventEntity; - } - - public void setV2XRoadEventEntity(V2XRoadEventEntity v2XRoadEventEntity) { - this.v2XRoadEventEntity = v2XRoadEventEntity; - } - - public V2XLiveCarInfoEntity getV2XLiveCarInfoRes() { - return v2XLiveCarInfoRes; - } - - public void setV2XLiveCarInfoRes(V2XLiveCarInfoEntity v2XLiveCarInfoRes) { - this.v2XLiveCarInfoRes = v2XLiveCarInfoRes; - } - - public List getV2XLiveCarList() { - return v2XLiveCarList; - } - - public void setV2XLiveCarList(List v2XLiveCarList) { - this.v2XLiveCarList = v2XLiveCarList; - } - - public V2XPushMessageEntity getV2XPushMessageEntity() { - return v2XPushMessageEntity; - } - - public void setV2XPushMessageEntity(V2XPushMessageEntity v2XPushMessageEntity) { - this.v2XPushMessageEntity = v2XPushMessageEntity; - } - - public MarkerExploreWay getV2XIllegalPark() { - return v2XIllegalPark; - } - - public void setV2XIllegalPark(MarkerExploreWay v2XIllegalPark) { - this.v2XIllegalPark = v2XIllegalPark; - } - - public V2XRecommendRouteEntity getV2XRecommendRouteEntity() { - return v2XRecommendRouteEntity; - } - - public void setV2XRecommendRouteEntity(V2XRecommendRouteEntity v2XRecommendRouteEntity) { - this.v2XRecommendRouteEntity = v2XRecommendRouteEntity; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - V2XEventShowEntity that = (V2XEventShowEntity) o; - return viewType == that.viewType && - Objects.equals(v2XRoadEventEntity, that.v2XRoadEventEntity) && - Objects.equals(v2XLiveCarInfoRes, that.v2XLiveCarInfoRes) && - Objects.equals(v2XLiveCarList, that.v2XLiveCarList) && - Objects.equals(v2XPushMessageEntity, that.v2XPushMessageEntity) && - Objects.equals(v2XIllegalPark, that.v2XIllegalPark) && - Objects.equals(v2XRecommendRouteEntity, that.v2XRecommendRouteEntity); - } - - @Override - public int hashCode() { - return Objects.hash(viewType, v2XRoadEventEntity, - v2XLiveCarInfoRes, v2XLiveCarList, - v2XPushMessageEntity, v2XIllegalPark, v2XRecommendRouteEntity); - } - - - @IntDef(value = { - V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING, - V2XMessageEntity.V2XTypeEnum.ALERT_SEEK_WARNING, - V2XMessageEntity.V2XTypeEnum.ALERT_FATIGUE_DRIVING, - V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_WINDOW_WARNING, - V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_TOAST_WARNING, - V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_LIVE_CAR_WARNING, - V2XMessageEntity.V2XTypeEnum.ALERT_ANIMATION_WARNING, - V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_LIVE_CAR_WARNING, - V2XMessageEntity.V2XTypeEnum.ALERT_ILLEGAL_PARK_WARNING, - V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP, - V2XMessageEntity.V2XTypeEnum.ALERT_RECOMMEND_ROUTE, - }) - @Target({ - ElementType.PARAMETER, - ElementType.FIELD, - ElementType.METHOD, - }) //表示注解作用范围,参数注解,成员注解,方法注解 - @Retention(RetentionPolicy.SOURCE) //表示注解所存活的时间,在运行时,而不会存在 .class 文件中 - public @interface ViewType { //接口,定义新的注解类型 - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XObuEventEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XObuEventEntity.java deleted file mode 100644 index 802e035a42..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XObuEventEntity.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.mogo.module.common.entity; - -/** - * obu事件封装 - * - * @author tongchenfei - */ -public class V2XObuEventEntity { - private int type; - private String desc; - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - - public String getDesc() { - return desc; - } - - public void setDesc(String desc) { - this.desc = desc; - } - - @Override - public String toString() { - return "V2XObuEventEntity{" + - "type=" + type + - ", desc='" + desc + '\'' + - '}'; - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XPushMessageEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XPushMessageEntity.java deleted file mode 100644 index 626a871b08..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XPushMessageEntity.java +++ /dev/null @@ -1,301 +0,0 @@ -package com.mogo.module.common.entity; - -import android.text.TextUtils; - -import java.io.Serializable; -import java.util.List; -import java.util.Objects; - -/** - * author : donghongyu - * e-mail : 1358506549@qq.com - * date : 2020-02-0315:49 - * desc : V2X警报数据 - * version: 1.0 - */ -public class V2XPushMessageEntity implements Serializable { - // 0---默认展示详情,1--直播,2--停车场,3--加油站,4--道路事件详情 - private int viewType; - private String sceneId; - private String sceneName; - private short sceneCategory; - private short sceneLevel; - private String sceneDescription; - private boolean zoom; - private int zoomScale; - private String alarmContent; - private String tts; - private String videoUrl; - private String videoSn; - private String videoChannel; - private int expireTime; - private long createTime; - - private String sn; - private String headImgUrl; - private String msgImgUrl; - private String address; - private double distance; - private boolean isShowWindow; - - private int age; - private String displayName; - private int sex; - private long userId; - - private double lat; - private double lon; - - private List recommendPolyline; - - public int getViewType() { - return viewType; - } - - public void setViewType(int viewType) { - this.viewType = viewType; - } - - public String getSceneId() { - return sceneId; - } - - public void setSceneId(String sceneId) { - this.sceneId = sceneId; - } - - public String getSceneName() { - return sceneName; - } - - public void setSceneName(String sceneName) { - this.sceneName = sceneName; - } - - public short getSceneCategory() { - return sceneCategory; - } - - public void setSceneCategory(short sceneCategory) { - this.sceneCategory = sceneCategory; - } - - public short getSceneLevel() { - return sceneLevel; - } - - public void setSceneLevel(short sceneLevel) { - this.sceneLevel = sceneLevel; - } - - public String getSceneDescription() { - return sceneDescription; - } - - public void setSceneDescription(String sceneDescription) { - this.sceneDescription = sceneDescription; - } - - public boolean isZoom() { - return zoom; - } - - public void setZoom(boolean zoom) { - this.zoom = zoom; - } - - public String getAlarmContent() { - if (TextUtils.isEmpty(alarmContent)) { - return ""; - } - return alarmContent; - } - - public void setAlarmContent(String alarmContent) { - this.alarmContent = alarmContent; - } - - public String getTts() { - if (TextUtils.isEmpty(tts)) { - return ""; - } - return tts; - } - - public void setTts(String tts) { - this.tts = tts; - } - - public String getVideoUrl() { - return videoUrl; - } - - public void setVideoUrl(String videoUrl) { - this.videoUrl = videoUrl; - } - - public String getVideoSn() { - return videoSn; - } - - public void setVideoSn(String videoSn) { - this.videoSn = videoSn; - } - - public String getVideoChannel() { - return videoChannel; - } - - public void setVideoChannel(String videoChannel) { - this.videoChannel = videoChannel; - } - - public int getExpireTime() { - return expireTime; - } - - public void setExpireTime(int expireTime) { - this.expireTime = expireTime; - } - - public int getZoomScale() { - return zoomScale; - } - - public void setZoomScale(int zoomScale) { - this.zoomScale = zoomScale; - } - - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public String getSn() { - return sn; - } - - public void setSn(String sn) { - this.sn = sn; - } - - public String getHeadImgUrl() { - return headImgUrl; - } - - public void setHeadImgUrl(String headImgUrl) { - this.headImgUrl = headImgUrl; - } - - public String getMsgImgUrl() { - return msgImgUrl; - } - - public void setMsgImgUrl(String msgImgUrl) { - this.msgImgUrl = msgImgUrl; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public double getDistance() { - return distance; - } - - public void setDistance(double distance) { - this.distance = distance; - } - - public boolean isShowWindow() { - return isShowWindow; - } - - public void setShowWindow(boolean showWindow) { - isShowWindow = showWindow; - } - - public long getCreateTime() { - return createTime; - } - - public void setCreateTime(long createTime) { - this.createTime = createTime; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - public int getSex() { - return sex; - } - - public void setSex(int sex) { - this.sex = sex; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public List getRecommendPolyline() { - return recommendPolyline; - } - - public void setRecommendPolyline(List recommendPolyline) { - this.recommendPolyline = recommendPolyline; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - V2XPushMessageEntity that = (V2XPushMessageEntity) o; - return Objects.equals(sceneId, that.sceneId) && - Objects.equals(tts, that.tts); - } - - @Override - public int hashCode() { - return Objects.hash(sceneId, tts); - } - - -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XRecommendRouteEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XRecommendRouteEntity.java deleted file mode 100644 index 1ba43ddd4c..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XRecommendRouteEntity.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.mogo.module.common.entity; - -import java.util.List; - -/** - * created by wujifei on 2020/12/31 18:45 - * describe:基于目的地预判的道路事件 - */ -public class V2XRecommendRouteEntity { - private List toPoint; //目的地坐标 - private String formatAddress; //目的地地址 - private String tts; //播报内容 - - public V2XRecommendRouteEntity(List toPoint, String formatAddress) { - this.toPoint = toPoint; - this.formatAddress = formatAddress; - } - - public List getToPoint() { - return toPoint; - } - - public void setToPoint(List toPoint) { - this.toPoint = toPoint; - } - - public String getFormatAddress() { - return formatAddress; - } - - public void setFormatAddress(String formatAddress) { - this.formatAddress = formatAddress; - } - - public String getTts() { - tts = "主人,我发现前往" + formatAddress + "沿途有拥堵,推荐你导航最优路线,现在开启导航吗?"; - return tts; - } -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnum.kt b/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnum.kt index 94c63c047d..6bafc726fa 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnum.kt +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnum.kt @@ -2,7 +2,6 @@ package com.mogo.module.common.enums import com.mogo.module.common.R import com.mogo.module.common.utils.CloudPoiManager -import com.mogo.module.common.utils.Const.* import com.zhidao.support.obu.constants.ObuConstants /** @@ -528,46 +527,6 @@ enum class EventTypeEnum( } } - /** - * 获取 UGC 问答使用的 Title 和 TTS 以及展示图表 - */ - @JvmStatic - fun getUgcTitleStr(poiType: String?): Array? { - val str = arrayOfNulls(5) - when (poiType) { - ROAD_CLOSED.poiType -> { - str[0] = "你刚经过 #### \n封路吗?" - str[1] = "你刚路过的路段封路吗?您可以直接对我说封路、或者不封路。" - str[2] = R.drawable.v_to_x_event_ugc_fenglu - str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP - str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP - } - FOURS_ROAD_WORK.poiType -> { - str[0] = "你刚经过 #### \n有道路施工吗?" - str[1] = "你刚路过的路段道路施工吗?您可以直接对我说有施工、或者没有施工。" - str[2] = R.drawable.bg_v2x_cancel_help - str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP - str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP - } - FOURS_BLOCK_UP.poiType -> { - str[0] = "你刚路过 #### \n堵不堵?" - str[1] = "你刚路过的路段堵不堵?您可以直接对我说拥赌、或者不堵。" - str[2] = R.drawable.v_to_x_event_ugc_yongdu - str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP - str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP - } - FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType, - FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> { - str[0] = "你刚经过 #### \n有事故发生吗?" - str[1] = "你刚路过的路段有交通事故吗?您可以直接对我说有事故、或者没有事故。" - str[2] = R.drawable.v_to_x_event_ugc_shigu - str[3] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP - str[4] = COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP - } - else -> return null - } - return str - } @JvmStatic fun getTts(poiType: String?): String { diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/Const.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/Const.java deleted file mode 100644 index b8dd429bd2..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/Const.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.mogo.module.common.utils; - -public class Const { - /** - * V2X 场景广播 Action - */ - public static final String BROADCAST_SCENE_HANDLER_ACTION = "com.v2x.scene_handler_broadcast"; - public static final String BROADCAST_SCENE_EXTRA_KEY = "V2XMessageEntity"; - - /** - * 用户UGC反馈免唤醒词语 - */ - // 拥堵 - public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP"; - public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP_WORDS = {"拥堵", "很堵", "堵死了", "有点堵", "确定"}; - - public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP"; - public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP_WORDS = {"没注意", "不堵", "很畅通", "取消", "关闭"}; - - - // 封路 - public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP"; - public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP_WORDS = {"封路了", "封了", "封路", "有封路", "确定"}; - - public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP"; - public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP_WORDS = {"不封路", "没注意", "没看到", "没有", "没封路", "无封路", "取消", "关闭"}; - - - // 事故 - public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP"; - public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP_WORDS = {"有事故", "存在交通事故", "确定"}; - - public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP"; - public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP_WORDS = {"没注意", "没有事故", "无事故", "没看到", "没有", "取消", "关闭"}; - - - // 道路施工 - public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP"; - public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP_WORDS = {"有", "在施工", "有施工", "确定"}; - - public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP"; - public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP_WORDS = {"没注意", "没看到", "没有施工", "无施工", "很正常", "取消", "关闭"}; -} diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/view/MarkerBaseFloor.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/view/MarkerBaseFloor.java deleted file mode 100644 index d42b79ebce..0000000000 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/view/MarkerBaseFloor.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.mogo.module.common.view; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.LayoutInflater; - -import androidx.annotation.Nullable; - -import com.mogo.module.common.R; -import com.mogo.module.common.drawer.marker.MapMarkerBaseView; -import com.mogo.module.common.entity.MarkerShowEntity; - -/** - * @author liujing - * @description 描述 - * @since: 2021/4/13 - */ -public class MarkerBaseFloor extends MapMarkerBaseView { - public MarkerBaseFloor(Context context) { - super(context); - } - - public MarkerBaseFloor(Context context, @Nullable AttributeSet attrs) { - super(context, attrs); - } - - public MarkerBaseFloor(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - @Override - protected void initView(Context context) { - LayoutInflater.from( context ).inflate(R.layout.module_common_warning_marker_bottom, this ); - } - - @Override - public void updateView(MarkerShowEntity markerShowEntity) { - - } -} diff --git a/modules/mogo-module-common/src/main/res/layout/module_common_warning_marker_bottom.xml b/modules/mogo-module-common/src/main/res/layout/module_common_warning_marker_bottom.xml deleted file mode 100644 index 1bc7234fa3..0000000000 --- a/modules/mogo-module-common/src/main/res/layout/module_common_warning_marker_bottom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-common/src/main/res/layout/module_common_warning_marker_front.xml b/modules/mogo-module-common/src/main/res/layout/module_common_warning_marker_front.xml deleted file mode 100644 index 1bc7234fa3..0000000000 --- a/modules/mogo-module-common/src/main/res/layout/module_common_warning_marker_front.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file