diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java
index 30cbec38f9..f4d202ef6c 100644
--- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java
+++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java
@@ -6,15 +6,14 @@ import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.alibaba.android.arouter.facade.annotation.Route;
-import com.elegant.utils.UiThreadHandler;
+import com.mogo.commons.module.status.IMogoStatusChangedListener;
+import com.mogo.commons.module.status.MogoStatusManager;
+import com.mogo.commons.module.status.StatusDescriptor;
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.map.MogoMapUIController;
-import com.mogo.module.common.MogoApisHandler;
import com.mogo.och.bus.passenger.constant.BusPassengerConst;
import com.mogo.och.bus.passenger.ui.BusPassengerRouteFragment;
-import com.mogo.service.statusmanager.IMogoStatusChangedListener;
-import com.mogo.service.statusmanager.StatusDescriptor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -64,8 +63,7 @@ public class MogoOCHBusPassenger implements IMogoOCH, IMogoStatusChangedListener
@Override
public void init(Context context) {
- MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("OchBus"
- , StatusDescriptor.VR_MODE, this);
+ MogoStatusManager.getInstance().registerStatusChangedListener("OchBus",StatusDescriptor.VR_MODE, this);
}
@Override
@@ -106,4 +104,5 @@ public class MogoOCHBusPassenger implements IMogoOCH, IMogoStatusChangedListener
mActivity.getSupportFragmentManager().beginTransaction().hide(mPassengerFragment).commitAllowingStateLoss();
}
}
+
}
diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java
index 9d6347d844..575e1f353b 100644
--- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java
+++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java
@@ -17,6 +17,9 @@ import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.module.intent.IMogoIntentListener;
import com.mogo.commons.module.intent.IntentManager;
+import com.mogo.commons.module.status.IMogoStatusChangedListener;
+import com.mogo.commons.module.status.MogoStatusManager;
+import com.mogo.commons.module.status.StatusDescriptor;
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
@@ -44,8 +47,6 @@ import com.mogo.och.bus.passenger.network.BusPassengerModelLoopManager;
import com.mogo.och.bus.passenger.network.BusPassengerServiceManager;
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback;
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
-import com.mogo.service.statusmanager.IMogoStatusChangedListener;
-import com.mogo.service.statusmanager.StatusDescriptor;
import org.jetbrains.annotations.NotNull;
@@ -247,10 +248,7 @@ public class BusPassengerModel {
// 2021.11.1重构自动驾驶 实现接口 IMoGoAutopilotStatusListener 注册监听 替换IMogoAdasOCHCallback接口
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, mGoAutopilotStatusListener);
IntentManager.getInstance().registerIntentListener(ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
- MogoApisHandler.getInstance()
- .getApis()
- .getStatusManagerApi()
- .registerStatusChangedListener( TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener );
+ MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener );
// 达到起始站围栏监听
MogoApisHandler.getInstance()
.getApis()
@@ -262,10 +260,7 @@ public class BusPassengerModel {
}
private void releaseListeners() {
- MogoApisHandler.getInstance()
- .getApis()
- .getStatusManagerApi()
- .unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
+ MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 注销到达起始站围栏监听
MogoApisHandler.getInstance()
@@ -293,15 +288,12 @@ public class BusPassengerModel {
}
};
- private final IMogoStatusChangedListener mMogoStatusChangedListener = new IMogoStatusChangedListener() {
- // VR mode变更回调
- @Override
- public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
- if (StatusDescriptor.VR_MODE == descriptor) {
- if (mControllerStatusCallbackMap.size() > 0) {
- for (IBusPassengerControllerStatusCallback callback :mControllerStatusCallbackMap.values()){
- callback.onVRModeChanged(isTrue);
- }
+ // VR mode变更回调
+ private final IMogoStatusChangedListener mMogoStatusChangedListener = (descriptor, isTrue) -> {
+ if (StatusDescriptor.VR_MODE == descriptor) {
+ if (mControllerStatusCallbackMap.size() > 0) {
+ for (IBusPassengerControllerStatusCallback callback :mControllerStatusCallbackMap.values()){
+ callback.onVRModeChanged(isTrue);
}
}
}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/BusProvider.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/BusProvider.java
index e60a54e1a6..629183bbb7 100644
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/BusProvider.java
+++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/BusProvider.java
@@ -10,13 +10,13 @@ import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import com.alibaba.android.arouter.facade.annotation.Route;
+import com.mogo.commons.module.status.IMogoStatusChangedListener;
+import com.mogo.commons.module.status.MogoStatusManager;
+import com.mogo.commons.module.status.StatusDescriptor;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.map.MogoMapUIController;
-import com.mogo.module.common.MogoApisHandler;
import com.mogo.och.bus.constant.BusConst;
import com.mogo.och.bus.fragment.BusFragment;
-import com.mogo.service.statusmanager.IMogoStatusChangedListener;
-import com.mogo.service.statusmanager.StatusDescriptor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -38,15 +38,15 @@ public class BusProvider implements IMogoOCH {
/**
* 进入鹰眼模式,设置手势缩放地图失效
*/
- private void stepIntoVrMode(){
- CallerLogger.INSTANCE.d( M_BUS + TAG, "进入vr模式" );
+ private void stepIntoVrMode() {
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "进入vr模式");
MogoMapUIController.getInstance()
.stepInVrMode(false);
}
@Override
public void init(Context context) {
- MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("OchBus"
+ MogoStatusManager.getInstance().registerStatusChangedListener("OchBus"
, StatusDescriptor.VR_MODE, statusChangedListener);
}
@@ -55,12 +55,12 @@ public class BusProvider implements IMogoOCH {
if (busFragment == null) {
CallerLogger.INSTANCE.d(TAG, "准备add fragment======");
Fragment fragmentByTag = supportFragmentManager.findFragmentByTag(BusFragment.TAG);
- if(fragmentByTag instanceof BusFragment){
- busFragment = (BusFragment)fragmentByTag;
- }else {
+ if (fragmentByTag instanceof BusFragment) {
+ busFragment = (BusFragment) fragmentByTag;
+ } else {
busFragment = new BusFragment();
}
- supportFragmentManager.beginTransaction().add(containerId, busFragment,BusFragment.TAG).commitAllowingStateLoss();
+ supportFragmentManager.beginTransaction().add(containerId, busFragment, BusFragment.TAG).commitAllowingStateLoss();
return;
}
CallerLogger.INSTANCE.d(TAG, "准备show fragment");
@@ -83,7 +83,7 @@ public class BusProvider implements IMogoOCH {
} else {
hideFragment();
}
- } else if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
+ } else if (MogoStatusManager.getInstance().isVrMode()) {
// topView进行展示时推出网约车界面,但是不隐藏整个fragment
if (busFragment != null && isTrue) {
busFragment.hideOchBus();
@@ -115,7 +115,9 @@ public class BusProvider implements IMogoOCH {
@Override
public void onDestroy() {
- //若不调用finish, 设置中打开关闭UITouch,会造成och fragment 重叠
+ //若不调用finish, 设置中打开关闭UITouch,会造成och fragment 重叠
+ MogoStatusManager.getInstance().unregisterStatusChangedListener("OchBus"
+ , StatusDescriptor.VR_MODE, statusChangedListener);
if (activity == null) return;
activity.finish();
}
diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java
index 058019a8a9..4c8665a874 100644
--- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java
+++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java
@@ -18,6 +18,9 @@ import com.elegant.network.utils.GsonUtil;
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
+import com.mogo.commons.module.status.IMogoStatusChangedListener;
+import com.mogo.commons.module.status.MogoStatusManager;
+import com.mogo.commons.module.status.StatusDescriptor;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.BaseData;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
@@ -61,8 +64,6 @@ import com.mogo.och.common.module.utils.PinYinUtil;
import com.mogo.och.common.module.utils.SoundPoolHelper;
import com.mogo.och.common.module.utils.ToastUtilsOch;
import com.mogo.och.common.module.voice.VoiceNotice;
-import com.mogo.service.statusmanager.IMogoStatusChangedListener;
-import com.mogo.service.statusmanager.StatusDescriptor;
import java.io.IOException;
import java.util.ArrayList;
@@ -76,7 +77,7 @@ import mogo.telematics.pad.MessagePad;
/**
* @author congtaowang
* @since 2021/3/23
- *
+ *
* 小巴订单管理
*/
public class BusOrderModel {
@@ -119,7 +120,7 @@ public class BusOrderModel {
private final Handler handler = new Handler(new Handler.Callback() {
@Override
public boolean handleMessage(Message msg) {
- if ( msg.what == MSG_QUERY_BUS_STATION ) {
+ if (msg.what == MSG_QUERY_BUS_STATION) {
queryBusRoutes();
return true;
}
@@ -128,9 +129,9 @@ public class BusOrderModel {
});
public static BusOrderModel getInstance() {
- if ( sInstance == null ) {
- synchronized ( BusOrderModel.class ) {
- if ( sInstance == null ) {
+ if (sInstance == null) {
+ synchronized (BusOrderModel.class) {
+ if (sInstance == null) {
sInstance = new BusOrderModel();
}
}
@@ -152,10 +153,7 @@ public class BusOrderModel {
.getApis()
.getRegisterCenterApi()
.registerCarLocationChangedListener(TAG, mCarLocationChangedListener2);
- MogoApisHandler.getInstance()
- .getApis()
- .getStatusManagerApi()
- .registerStatusChangedListener( TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener );
+ MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
//自动驾驶路线规划接口
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
@@ -170,44 +168,44 @@ public class BusOrderModel {
public void accept(Throwable e) {
if (e instanceof UndeliverableException) {
e = e.getCause();
- CallerLogger.INSTANCE.d(M_BUS + TAG,"UndeliverableException");
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "UndeliverableException");
}
if ((e instanceof IOException)) {//
// fine, irrelevant network problem or API that throws on cancellation
- CallerLogger.INSTANCE.d(M_BUS + TAG,"IOException");
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "IOException");
return;
}
if (e instanceof InterruptedException) {
// fine, some blocking code was interrupted by a dispose call
- CallerLogger.INSTANCE.d(M_BUS + TAG,"InterruptedException");
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "InterruptedException");
return;
}
if ((e instanceof NullPointerException) || (e instanceof IllegalArgumentException)) {
// that's likely a bug in the application
- CallerLogger.INSTANCE.d(M_BUS + TAG,"NullPointerException or IllegalArgumentException");
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "NullPointerException or IllegalArgumentException");
Thread.currentThread().getUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), e);
return;
}
if (e instanceof IllegalStateException) {
// that's a bug in RxJava or in a custom operator
- CallerLogger.INSTANCE.d(M_BUS + TAG,"IllegalStateException");
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "IllegalStateException");
Thread.currentThread().getUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), e);
return;
}
- CallerLogger.INSTANCE.d(M_BUS + TAG,"Undeliverable exception");
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "Undeliverable exception");
}
});
}
- public void setRefreshBusStationsCallback(IRefreshBusStationsCallback callback){
+ public void setRefreshBusStationsCallback(IRefreshBusStationsCallback callback) {
this.refreshBusStationsCallback = callback;
}
- public void setPassengerCallback(IPassengerCallback callback){
+ public void setPassengerCallback(IPassengerCallback callback) {
this.mPassengerCallback = callback;
}
- public void setSlidePanelHideCallback(ISlidePannelHideCallback callback){
+ public void setSlidePanelHideCallback(ISlidePannelHideCallback callback) {
this.slidePanelHideCallback = callback;
}
@@ -224,9 +222,9 @@ public class BusOrderModel {
@Override
public void onAutopilotRotting(MessagePad.GlobalPathResp routeList) {
- if (null != routeList && routeList.getWayPointsList().size() > 0){
+ if (null != routeList && routeList.getWayPointsList().size() > 0) {
points.clear();
- points.addAll(coordinateConverterWgsToGcjList(mContext,routeList.getWayPointsList()));
+ points.addAll(coordinateConverterWgsToGcjList(mContext, routeList.getWayPointsList()));
updateOrderRoute();
}
}
@@ -249,12 +247,12 @@ public class BusOrderModel {
* 上报订单全路径规划数据
*/
public void updateOrderRoute() {
- if (!isGoingToNextStation || backgroundCurrentStationIndex+1 >= stationList.size() || points.size() == 0){
+ if (!isGoingToNextStation || backgroundCurrentStationIndex + 1 >= stationList.size() || points.size() == 0) {
return;
}
- BusStationBean currentStation = stationList.get( backgroundCurrentStationIndex);
- BusStationBean nextStation = stationList.get( backgroundCurrentStationIndex +1);
+ BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
+ BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
BusServiceManager.updateOrderRoute(mContext, currentLineId, currentStation.getSiteId()
, nextStation.getSiteId(), points, new OchCommonServiceCallback() {
@@ -265,27 +263,24 @@ public class BusOrderModel {
@Override
public void onFail(int code, String failMsg) {
- if (isGoingToNextStation){//重试
+ if (isGoingToNextStation) {//重试
updateOrderRoute();
}
}
});
}
- public void debugUpdateOrderRoute(List list){
+ public void debugUpdateOrderRoute(List list) {
points.clear();
- points.addAll(coordinateConverterWgsToGcjList(mContext,list));
+ points.addAll(coordinateConverterWgsToGcjList(mContext, list));
updateOrderRoute();
}
- public void release(){
+ public void release() {
startOrStopOrderLoop(false);
startOrStopQueryPassengerWriteOff(false);
- MogoApisHandler.getInstance()
- .getApis()
- .getStatusManagerApi()
- .unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
+ MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 注销到达起始站围栏监听
MogoApisHandler.getInstance()
@@ -303,7 +298,7 @@ public class BusOrderModel {
return sInstance;
}
- private IMogoStatusChangedListener mMogoStatusChangedListener = new IMogoStatusChangedListener() {
+ private final IMogoStatusChangedListener mMogoStatusChangedListener = new IMogoStatusChangedListener() {
// VR mode变更回调
@Override
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
@@ -319,7 +314,7 @@ public class BusOrderModel {
private final IMogoCarLocationChangedListener2 mCarLocationChangedListener2 = new IMogoCarLocationChangedListener2() {
@Override
- public void onCarLocationChanged2( Location location ) {
+ public void onCarLocationChanged2(Location location) {
// CallerLogger.INSTANCE.d(M_BUS + TAG,"location = "+location.getLongitude()+","+location.getLatitude());
mLongitude = location.getLongitude();
mLatitude = location.getLatitude();
@@ -328,7 +323,7 @@ public class BusOrderModel {
}
//是否到站的围栏判断 离站状态并且自动驾驶还未触发到站
- if (isGoingToNextStation && !isArrivedStation){
+ if (isGoingToNextStation && !isArrivedStation) {
judgeArrivedStation(location);
}
}
@@ -337,21 +332,21 @@ public class BusOrderModel {
//根据围栏判断,是否到达站点
private void judgeArrivedStation(Location location) {
- if (backgroundCurrentStationIndex +1 > stationList.size() - 1 ){
- CallerLogger.INSTANCE.e( M_BUS + TAG, "到站数组越界" );
+ if (backgroundCurrentStationIndex + 1 > stationList.size() - 1) {
+ CallerLogger.INSTANCE.e(M_BUS + TAG, "到站数组越界");
return;
}
- BusStationBean upcomingStation = stationList.get( backgroundCurrentStationIndex +1);
+ BusStationBean upcomingStation = stationList.get(backgroundCurrentStationIndex + 1);
double startLon = upcomingStation.getGcjLon();
double startLat = upcomingStation.getGcjLat();
double distance = CoordinateUtils.calculateLineDistance(
startLon, startLat,
- location.getLongitude(), location.getLatitude() );
+ location.getLongitude(), location.getLatitude());
- if ( distance <= BusConst.ARRIVE_AT_END_STATION_DISTANCE ) {
- CallerLogger.INSTANCE.d(M_BUS + TAG,"行程日志-judgeArrivedStation() distance = " + distance
- +" to " + upcomingStation.getName());
+ if (distance <= BusConst.ARRIVE_AT_END_STATION_DISTANCE) {
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "行程日志-judgeArrivedStation() distance = " + distance
+ + " to " + upcomingStation.getName());
onArriveAt(null); //无自动驾驶到站信息传null
return;
}
@@ -365,13 +360,13 @@ public class BusOrderModel {
BusServiceManager.queryBusRoutes(mContext, new OchCommonServiceCallback() {
@Override
public void onSuccess(BusRoutesResponse data) {
- if ( data == null
+ if (data == null
|| data.getResult() == null
|| data.getResult().getSites() == null
- || data.getResult().getSites().isEmpty() ) {
+ || data.getResult().getSites().isEmpty()) {
//当为空时,显示无绑定路线图
- CallerLogger.INSTANCE.d(M_BUS + TAG, "获取到小巴路线数据:空 " );
- if (refreshBusStationsCallback != null){
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "获取到小巴路线数据:空 ");
+ if (refreshBusStationsCallback != null) {
refreshBusStationsCallback.updateEmptyUi();
}
clearAutopilotControlParameters();
@@ -379,9 +374,10 @@ public class BusOrderModel {
clearStartAutopilotTag();
return;
}
- CallerLogger.INSTANCE.d(M_BUS + TAG, "获取到小巴路线数据: " + data );
- updateBusStatus( data.getResult());
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "获取到小巴路线数据: " + data);
+ updateBusStatus(data.getResult());
}
+
@Override
public void onFail(int code, String failMsg) {
// 重复请求小巴路线,直至成功
@@ -394,26 +390,27 @@ public class BusOrderModel {
/**
* 更新正在运行的任务UI
+ *
* @param stations
*/
private void updateBusTaskStatus(List stations) {
int arrivingOrArrivedStationIndex = 0;//已经到站或者即将到站的索引呢
- for (int i =0 ; i< stations.size(); i++){
+ for (int i = 0; i < stations.size(); i++) {
BusStationBean station = stations.get(i);
- if (i == 0){ // 首发站 显示在最上面
+ if (i == 0) { // 首发站 显示在最上面
if (station.getDrivingStatus() == STATION_STATUS_STOPPED
- && !station.isLeaving()){ //到达第一站
+ && !station.isLeaving()) { //到达第一站
arrivingOrArrivedStationIndex = i;
break;
}
- }else {
- BusStationBean preStation = stations.get(i-1);
+ } else {
+ BusStationBean preStation = stations.get(i - 1);
if ((station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving())
|| (station.getDrivingStatus() == STATION_STATUS_ARRIVING
- && preStation.isLeaving())){
+ && preStation.isLeaving())) {
//到站未离开 | 即将到站 显示在最中间
arrivingOrArrivedStationIndex = i;
break;
@@ -429,16 +426,16 @@ public class BusOrderModel {
if (arrivingOrArrivedStationIndex == 0 ||
arrivingOrArrivedStation.getDrivingStatus() == STATION_STATUS_STOPPED
- && !arrivingOrArrivedStation.isLeaving()){
- if (refreshBusStationsCallback != null){
- refreshBusStationsCallback.updateBusTaskStatus(busRoutesResult.getName(),lineTime,
- stationList,arrivingOrArrivedStationIndex,true);
+ && !arrivingOrArrivedStation.isLeaving()) {
+ if (refreshBusStationsCallback != null) {
+ refreshBusStationsCallback.updateBusTaskStatus(busRoutesResult.getName(), lineTime,
+ stationList, arrivingOrArrivedStationIndex, true);
}
clearAutopilotControlParameters();
- }else {
- if (refreshBusStationsCallback != null){
- refreshBusStationsCallback.updateBusTaskStatus(busRoutesResult.getName(),lineTime,
- stationList,arrivingOrArrivedStationIndex,false);
+ } else {
+ if (refreshBusStationsCallback != null) {
+ refreshBusStationsCallback.updateBusTaskStatus(busRoutesResult.getName(), lineTime,
+ stationList, arrivingOrArrivedStationIndex, false);
}
updateAutopilotControlParameters();
}
@@ -448,25 +445,25 @@ public class BusOrderModel {
* 重置路线站点状态--结束路线,当前路线恢复到始发站
*/
public void abortTask() {
- CallerLogger.INSTANCE.d( M_BUS + TAG, "结束当前路线abortTask");
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "结束当前路线abortTask");
BusServiceManager.abortTask(mContext, currentTaskId
, new OchCommonServiceCallback() {
- @Override
- public void onSuccess(BaseData o) {
- CallerLogger.INSTANCE.d(M_BUS + TAG, "abortTask success: " + o);
- if (o.code == 0){ // 重置成功
- endOrAbortTaskSuccess();
- clearBusStationDatas();
- queryBusRoutes();
- startOrStopQueryPassengerWriteOff(false);
- }
- }
+ @Override
+ public void onSuccess(BaseData o) {
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "abortTask success: " + o);
+ if (o.code == 0) { // 重置成功
+ endOrAbortTaskSuccess();
+ clearBusStationDatas();
+ queryBusRoutes();
+ startOrStopQueryPassengerWriteOff(false);
+ }
+ }
- @Override
- public void onFail(int code, String failMsg) {
- ToastUtils.showShort(failMsg);
- }
- });
+ @Override
+ public void onFail(int code, String failMsg) {
+ ToastUtils.showShort(failMsg);
+ }
+ });
}
@@ -478,12 +475,12 @@ public class BusOrderModel {
isGoingToNextStation = false;
backgroundCurrentStationIndex = 0;
- if (busRoutesResult != null){
+ if (busRoutesResult != null) {
BusSendTripInfoManager.INSTANCE.sendBusTripInfo(BusSendTripInfoManager.END_TRIP
, busRoutesResult.getName()
- ,""
- ,""
- ,false);
+ , ""
+ , ""
+ , false);
}
}
@@ -492,23 +489,23 @@ public class BusOrderModel {
* 服务端返回的OchBusRoutesResult逻辑, 离开站为当前站, 到达下一站后才会将下一站置为当前站,
* 车机端展示是离开当前站,下一站设置为当前站, 所以服务端数据回来要做处理,不能直接渲染
*/
- private void leaveStationSuccess(int leaveIndex,String leaveStation,String nextStation) {
+ private void leaveStationSuccess(int leaveIndex, String leaveStation, String nextStation) {
onStartAutopilot(leaveIndex);
leaveTTSTips(nextStation);
- if (busRoutesResult != null){
+ if (busRoutesResult != null) {
boolean isLastStop = false;
- if (leaveIndex + 1 == stationList.size() -1){
+ if (leaveIndex + 1 == stationList.size() - 1) {
isLastStop = true;
}
//给bus外屏发送
BusSendTripInfoManager.INSTANCE.sendBusTripInfo(BusSendTripInfoManager.LEAVE_STATION
, busRoutesResult.getName()
- ,leaveStation
- ,nextStation
- ,isLastStop);
+ , leaveStation
+ , nextStation
+ , isLastStop);
}
}
@@ -516,27 +513,28 @@ public class BusOrderModel {
//开启自动驾驶 2.10.0: 如果自动驾驶状态下开启, 非自动驾驶状态下不开启,需手动点击自动驾驶按钮开启
isGoingToNextStation = true;
if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState()
- == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
- startAutopilot(false,leaveIndex);
- }else {
+ == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
+ startAutopilot(false, leaveIndex);
+ } else {
firstStartAutopilot = 0;
}
}
/**
* 开启自动驾驶
+ *
* @param isRestart
*/
- private void startAutopilot(boolean isRestart,int leaveIndex) {
+ private void startAutopilot(boolean isRestart, int leaveIndex) {
- if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().getAutopilotAbilityStatus()){
+ if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().getAutopilotAbilityStatus()) {
ToastUtils.showLong(OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason() +
", 请稍候重试");
triggerUnableStartAPReasonEvent();
return;
}
- firstStartAutopilot ++;
+ firstStartAutopilot++;
triggerStartServiceEvent(isRestart, false);
@@ -548,9 +546,9 @@ public class BusOrderModel {
CallerAutoPilotManager.INSTANCE.startAutoPilot(parameters);
- CallerLogger.INSTANCE.d( M_BUS + TAG, "行程日志-开启自动驾驶====" + GsonUtil.jsonFromObject(parameters)
- +" startLatLon="+parameters.startName+",endLatLon="+parameters.endName +
- "isRestart = " + isRestart);
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "行程日志-开启自动驾驶====" + GsonUtil.jsonFromObject(parameters)
+ + " startLatLon=" + parameters.startName + ",endLatLon=" + parameters.endName +
+ "isRestart = " + isRestart);
if (mControllerStatusCallback != null) {
mControllerStatusCallback.startOpenAutopilot();
@@ -560,21 +558,21 @@ public class BusOrderModel {
/**
* 到站查询核销乘客
*/
- public void queryPassengerWriteOff(){
- if ( backgroundCurrentStationIndex > stationList.size() - 1 ) { //到站短时间内调用多次
- CallerLogger.INSTANCE.e( M_BUS + TAG, "数组越界" );
+ public void queryPassengerWriteOff() {
+ if (backgroundCurrentStationIndex > stationList.size() - 1) { //到站短时间内调用多次
+ CallerLogger.INSTANCE.e(M_BUS + TAG, "数组越界");
return;
}
BusServiceManager.queryStationWriteOffPassengers(mContext,
currentTaskId,
stationList.get(backgroundCurrentStationIndex).getSiteId(),
prePassengerWriteOffTime,
- new OchCommonServiceCallback(){
+ new OchCommonServiceCallback() {
@Override
public void onSuccess(BusQueryWriteOffPassengersResponse o) {
- if (o.code !=0 || o.data == null || o.data.isEmpty()){
- return;
+ if (o.code != 0 || o.data == null || o.data.isEmpty()) {
+ return;
}
List passengers = o.data;
playWriteOffPassengersMsg(passengers);
@@ -588,21 +586,21 @@ public class BusOrderModel {
}
private void playWriteOffPassengersMsg(List passengers) {
- for (int i=0; i< passengers.size();i++){
+ for (int i = 0; i < passengers.size(); i++) {
WriteOffPassenger passenger = passengers.get(i);
- CallerLogger.INSTANCE.e( M_BUS + TAG, "size = " + passenger.passengerSize+
- " time = "+passenger.writeOffTime);
+ CallerLogger.INSTANCE.e(M_BUS + TAG, "size = " + passenger.passengerSize +
+ " time = " + passenger.writeOffTime);
prePassengerWriteOffTime = passenger.writeOffTime;
- if (mPassengerCallback != null){
+ if (mPassengerCallback != null) {
mPassengerCallback.playPassenger(passenger);
}
}
}
- private void startOrStopQueryPassengerWriteOff(boolean isStart){
- if (isStart){
+ private void startOrStopQueryPassengerWriteOff(boolean isStart) {
+ if (isStart) {
BusModelLoopManager.getInstance().startQueryPassengerWriteOffLoop();
- }else {
+ } else {
prePassengerWriteOffTime = 0;
SoundPoolHelper.getSoundPoolHelper().releaseSoundPool();
BusModelLoopManager.getInstance().stopQueryPassengerWriteOffLoop();
@@ -613,26 +611,26 @@ public class BusOrderModel {
* 到站后重置站点状态
*/
private void arriveSiteStation() {
- if ( backgroundCurrentStationIndex +1 > stationList.size() - 1 ) { //到站短时间内调用多次
- CallerLogger.INSTANCE.e( M_BUS + TAG, "数组越界" );
+ if (backgroundCurrentStationIndex + 1 > stationList.size() - 1) { //到站短时间内调用多次
+ CallerLogger.INSTANCE.e(M_BUS + TAG, "数组越界");
return;
}
int arrivedStationIndex = backgroundCurrentStationIndex + 1;
String arriveStation = stationList.get(arrivedStationIndex).getName();
String departureStopName = stationList.get(backgroundCurrentStationIndex).getName();
- CallerLogger.INSTANCE.d(M_BUS + TAG,"arriveSiteStation-currentStationIndex = "+ arrivedStationIndex);
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "arriveSiteStation-currentStationIndex = " + arrivedStationIndex);
- BusServiceManager.arriveSiteStation(mContext ,
+ BusServiceManager.arriveSiteStation(mContext,
stationList.get(arrivedStationIndex).getSeq(),
stationList.get(arrivedStationIndex).getSiteId(),
- currentTaskId ,
+ currentTaskId,
new OchCommonServiceCallback() {
@Override
public void onSuccess(BaseData o) {
- CallerLogger.INSTANCE.d(M_BUS + TAG,"行程日志-arriveSiteStation success");
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "行程日志-arriveSiteStation success");
queryBusRoutes();
- arriveStationSuccess(arrivedStationIndex,departureStopName,arriveStation);
+ arriveStationSuccess(arrivedStationIndex, departureStopName, arriveStation);
//5s轮询核销乘客
startOrStopQueryPassengerWriteOff(true);
@@ -642,10 +640,10 @@ public class BusOrderModel {
public void onFail(int code, String failMsg) {
isArrivedStation = false;
isGoingToNextStation = true;
- if (ToastUtilsOch.isCustomFastClick(5000)){
+ if (ToastUtilsOch.isCustomFastClick(5000)) {
if (!NetworkUtils.isConnected(mContext)) {
ToastUtils.showShort("网络异常,请稍后重试");
- }else {
+ } else {
ToastUtils.showShort(failMsg);
}
}
@@ -653,18 +651,18 @@ public class BusOrderModel {
});
}
- private void arriveStationSuccess(int arrivedStationIndex,String departureStopName,String arriveStation) {
- if (busRoutesResult != null){
+ private void arriveStationSuccess(int arrivedStationIndex, String departureStopName, String arriveStation) {
+ if (busRoutesResult != null) {
boolean isLastStop = false;
- if (arrivedStationIndex == busRoutesResult.getSites().size() - 1 ){
+ if (arrivedStationIndex == busRoutesResult.getSites().size() - 1) {
isLastStop = true;
}
//给bus外屏发送
BusSendTripInfoManager.INSTANCE.sendBusTripInfo(BusSendTripInfoManager.ARRIVE_STATION
, busRoutesResult.getName()
- ,departureStopName
- ,arriveStation
- ,isLastStop);
+ , departureStopName
+ , arriveStation
+ , isLastStop);
}
VoiceNotice.showNotice(String.format(mContext
@@ -675,10 +673,10 @@ public class BusOrderModel {
/**
* 离站上报
*/
- public void leaveStation(){
- CallerLogger.INSTANCE.d(M_BUS + TAG,"leaveStation-backgroundCurrentStationIndex = "+backgroundCurrentStationIndex);
+ public void leaveStation() {
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "leaveStation-backgroundCurrentStationIndex = " + backgroundCurrentStationIndex);
String nextStationName = "";
- if (backgroundCurrentStationIndex < stationList.size() - 1){
+ if (backgroundCurrentStationIndex < stationList.size() - 1) {
nextStationName = stationList.get(backgroundCurrentStationIndex + 1).getName();
}
final String currentStationName = stationList.get(backgroundCurrentStationIndex).getName();
@@ -691,18 +689,19 @@ public class BusOrderModel {
@Override
public void onSuccess(BaseData o) {
isArrivedStation = false;
- CallerLogger.INSTANCE.d( M_BUS + TAG, "行程日志-离站成功开往下一站====" );
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "行程日志-离站成功开往下一站====");
//需要更改当前站和下一站的状态 然后渲染
- startOrStopQueryPassengerWriteOff(false);
- queryBusRoutes();
- leaveStationSuccess(backgroundCurrentStationIndex,currentStationName,finalNextStationName);
+ startOrStopQueryPassengerWriteOff(false);
+ queryBusRoutes();
+ leaveStationSuccess(backgroundCurrentStationIndex, currentStationName, finalNextStationName);
}
+
@Override
public void onFail(int code, String failMsg) {
if (!NetworkUtils.isConnected(mContext)) {
ToastUtils.showShort("网络异常,请稍后重试");
- }else{
- ToastUtils.showShort("离站上报失败:"+failMsg);
+ } else {
+ ToastUtils.showShort("离站上报失败:" + failMsg);
}
}
});
@@ -712,7 +711,7 @@ public class BusOrderModel {
private void leaveTTSTips(String nextStation) {
VoiceNotice.showNotice(String.format(mContext
.getString(R.string.bus_leave_station_tip),
- nextStation),DELAY_10S);
+ nextStation), DELAY_10S);
}
/**
@@ -731,7 +730,7 @@ public class BusOrderModel {
* 开启自动驾驶到下一站
*/
public void autoDriveToNextStation() {
- if ( backgroundCurrentStationIndex >= stationList.size() - 1 ) {
+ if (backgroundCurrentStationIndex >= stationList.size() - 1) {
// 当前站是最后一站,结束当前行程
travelOver();
return;
@@ -743,6 +742,7 @@ public class BusOrderModel {
* 渲染站点信息
* 服务端返回的OchBusRoutesResult逻辑, 离开站为当前站, 到达下一站后才会将下一站置为当前站,
* 车机端展示 三站: 中间为即将到到达或者刚到达的站
+ *
* @param result
*/
private void updateBusStatus(BusRoutesResult result) {
@@ -752,20 +752,20 @@ public class BusOrderModel {
currentTaskId = result.getTaskId();
currentLineId = result.getLineId();
stationList.clear();
- stationList.addAll( site );
+ stationList.addAll(site);
- for ( int i = 0; i < stationList.size(); i++ ) {
- BusStationBean s = stationList.get( i );
+ for (int i = 0; i < stationList.size(); i++) {
+ BusStationBean s = stationList.get(i);
- CallerLogger.INSTANCE.d( M_BUS + "updateBusStationsStatus--",
- "Index="+ i+" ,name = "+s.getName()+" ,"+s.isLeaving()+","+s.getDrivingStatus());
+ CallerLogger.INSTANCE.d(M_BUS + "updateBusStationsStatus--",
+ "Index=" + i + " ,name = " + s.getName() + " ," + s.isLeaving() + "," + s.getDrivingStatus());
// 是否正在开往下一站
- if ( s.isLeaving()) {
+ if (s.isLeaving()) {
isGoingToNextStation = true;
}
// 当前站点信息
- if (s.getDrivingStatus() == STATION_STATUS_STOPPED ) {
+ if (s.getDrivingStatus() == STATION_STATUS_STOPPED) {
backgroundCurrentStationIndex = i;
break;
}
@@ -773,40 +773,40 @@ public class BusOrderModel {
if (backgroundCurrentStationIndex == 0 &&
stationList.get(0).getDrivingStatus() == STATION_STATUS_STOPPED
- && !stationList.get(0).isLeaving()){ //默认是第一站到站查询
- if (busRoutesResult != null){ // 第一站到站也是行程开始的时候
+ && !stationList.get(0).isLeaving()) { //默认是第一站到站查询
+ if (busRoutesResult != null) { // 第一站到站也是行程开始的时候
BusSendTripInfoManager.INSTANCE.sendBusTripInfo(BusSendTripInfoManager.START_TRIP
- ,busRoutesResult.getName(),"","",false);
+ , busRoutesResult.getName(), "", "", false);
}
startOrStopQueryPassengerWriteOff(true);
}
BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
- CallerLogger.INSTANCE.d( M_BUS + TAG,
+ CallerLogger.INSTANCE.d(M_BUS + TAG,
"行程日志-STATION_STATUS_STOPPED-backgroundCurrentStationIndex="
- +backgroundCurrentStationIndex
- +" isLeaving()="+currentStation.isLeaving());
+ + backgroundCurrentStationIndex
+ + " isLeaving()=" + currentStation.isLeaving());
// 美化是否开始
if (FunctionBuildConfig.isDemoMode && (backgroundCurrentStationIndex >= 0
- && backgroundCurrentStationIndex <= stationList.size()-1)){//行驶过程中设置美化
- if (stationList.get(backgroundCurrentStationIndex).isLeaving()){
+ && backgroundCurrentStationIndex <= stationList.size() - 1)) {//行驶过程中设置美化
+ if (stationList.get(backgroundCurrentStationIndex).isLeaving()) {
startBeautificationMode();
CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore:置为true(每次滑动出发)");
- }else if (backgroundCurrentStationIndex >0 && backgroundCurrentStationIndex < stationList.size()-1){
+ } else if (backgroundCurrentStationIndex > 0 && backgroundCurrentStationIndex < stationList.size() - 1) {
//美化模式下 中间站点到站 引导线要一直绘制,所以此处不出强制绘制不传false
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false);
CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore:false(到达中间站)");
clearStartAutopilotTag();
- }else{
+ } else {
closeBeautificationMode();
clearStartAutopilotTag();
}
}
- if ( currentStation.isLeaving() && slidePanelHideCallback != null) {
+ if (currentStation.isLeaving() && slidePanelHideCallback != null) {
slidePanelHideCallback.hideSlidePanel();
}
@@ -827,8 +827,8 @@ public class BusOrderModel {
CallerAutoPilotManager.INSTANCE.setIPCDemoMode(true);
}
- public void clearBusStationDatas(){
- if (refreshBusStationsCallback != null){
+ public void clearBusStationDatas() {
+ if (refreshBusStationsCallback != null) {
refreshBusStationsCallback.clearBusStationsMarkers();
}
}
@@ -837,19 +837,19 @@ public class BusOrderModel {
* 延时查询站点信心
*/
private void queryBusStationDelay() {
- handler.sendEmptyMessageDelayed( MSG_QUERY_BUS_STATION, QUERY_BUS_STATION_DELAY );
+ handler.sendEmptyMessageDelayed(MSG_QUERY_BUS_STATION, QUERY_BUS_STATION_DELAY);
}
/**
* 在踩刹车、控制方向盘等操作后,会停止自动驾驶,重启自动驾驶的话相当于重新设置自动驾驶目的地
*/
public void restartAutopilot() {
- CallerLogger.INSTANCE.d( M_BUS + TAG, "行程日志-重启自动驾驶===" + isGoingToNextStation );
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "行程日志-重启自动驾驶===" + isGoingToNextStation);
//只去启动自动驾驶,不再去上报离站
- startAutopilot(firstStartAutopilot >= 1,-1);
+ startAutopilot(firstStartAutopilot >= 1, -1);
}
- public boolean isRestartAutopilot(){
+ public boolean isRestartAutopilot() {
return firstStartAutopilot > 1;
}
@@ -858,11 +858,11 @@ public class BusOrderModel {
*/
private void travelOver() {
- if ( backgroundCurrentStationIndex >= stationList.size() ) {
- CallerLogger.INSTANCE.e( M_BUS + TAG, "travel over index out of station list" );
+ if (backgroundCurrentStationIndex >= stationList.size()) {
+ CallerLogger.INSTANCE.e(M_BUS + TAG, "travel over index out of station list");
return;
}
- CallerLogger.INSTANCE.d( M_BUS + TAG, "单程结束====" );
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "单程结束====");
CallerAutoPilotManager.INSTANCE.cancelAutoPilot();
endTask();
@@ -872,13 +872,13 @@ public class BusOrderModel {
* task正常结束
*/
private void endTask() {
- CallerLogger.INSTANCE.d( M_BUS + TAG, "任务正常走完endTask()");
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "任务正常走完endTask()");
BusServiceManager.endTask(mContext, currentTaskId
, new OchCommonServiceCallback() {
@Override
public void onSuccess(BaseData o) {
CallerLogger.INSTANCE.d(M_BUS + TAG, "endTask success: " + o);
- if (o.code == 0){
+ if (o.code == 0) {
endOrAbortTaskSuccess();
clearBusStationDatas();
queryBusRoutes();// 重新获取任务
@@ -896,28 +896,29 @@ public class BusOrderModel {
/**
* 到站
+ *
* @param data
*/
- public void onArriveAt( MessagePad.ArrivalNotification data){
- if ( backgroundCurrentStationIndex +1 > stationList.size() - 1 ) {
- CallerLogger.INSTANCE.e( M_BUS + TAG, "行程日志-到站异常,取消后续操作结束" );
+ public void onArriveAt(MessagePad.ArrivalNotification data) {
+ if (backgroundCurrentStationIndex + 1 > stationList.size() - 1) {
+ CallerLogger.INSTANCE.e(M_BUS + TAG, "行程日志-到站异常,取消后续操作结束");
return;
}
//MAP 280 每隔100ms左右返回一次到站, 导致在到达中间站后再次滑动出发后会有时间差,收到一次到站,出现问题
//此处比对 自驾告诉的到站站点坐标和本地应到站站点坐标, 一致时才能到站
- if (data != null && data.getEndLocation() != null){
+ if (data != null && data.getEndLocation() != null) {
- String latitude = NumberFormatUtil.cutOutNumber(data.getEndLocation().getLatitude(),5); //wgs
- String longitude = NumberFormatUtil.cutOutNumber(data.getEndLocation().getLongitude(),5);
+ String latitude = NumberFormatUtil.cutOutNumber(data.getEndLocation().getLatitude(), 5); //wgs
+ String longitude = NumberFormatUtil.cutOutNumber(data.getEndLocation().getLongitude(), 5);
int arrivedStationIndex = backgroundCurrentStationIndex + 1;
BusStationBean arriveStation = stationList.get(arrivedStationIndex);
- String arriveLat = NumberFormatUtil.cutOutNumber(arriveStation.getLat(),5);
- String arriveLon = NumberFormatUtil.cutOutNumber(arriveStation.getLon(),5);
+ String arriveLat = NumberFormatUtil.cutOutNumber(arriveStation.getLat(), 5);
+ String arriveLon = NumberFormatUtil.cutOutNumber(arriveStation.getLon(), 5);
- if (!latitude.equals(arriveLat) || !longitude.equals(arriveLon)){
- CallerLogger.INSTANCE.e( M_BUS + TAG, "行程日志-到站拦截,到站坐标不一致" );
+ if (!latitude.equals(arriveLat) || !longitude.equals(arriveLon)) {
+ CallerLogger.INSTANCE.e(M_BUS + TAG, "行程日志-到站拦截,到站坐标不一致");
return;
}
}
@@ -925,7 +926,7 @@ public class BusOrderModel {
if (isArrivedStation) return;
isArrivedStation = true;
- CallerLogger.INSTANCE.d( M_BUS + TAG, "行程日志-当前==backgroundCurrentStationIndex="
+ CallerLogger.INSTANCE.d(M_BUS + TAG, "行程日志-当前==backgroundCurrentStationIndex="
+ backgroundCurrentStationIndex);
isGoingToNextStation = false;
@@ -964,25 +965,25 @@ public class BusOrderModel {
// 登出
public void logout() {
- loginService.loginOut(mLatitude,mLongitude);
+ loginService.loginOut(mLatitude, mLongitude);
}
public void triggerStartServiceEvent(boolean isRestart, boolean send) {
- if (stationList == null || backgroundCurrentStationIndex >= stationList.size()-1) {
+ if (stationList == null || backgroundCurrentStationIndex >= stationList.size() - 1) {
return;
}
- BusStationBean currentStation = stationList.get( backgroundCurrentStationIndex);
- BusStationBean nextStation = stationList.get( backgroundCurrentStationIndex +1);
+ BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
+ BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
BusAnalyticsManager.getInstance().triggerStartAutopilotEvent(isRestart, send,
currentStation.getName(), nextStation.getName(), currentLineId);
}
public void triggerUnableStartAPReasonEvent() {
- if (stationList == null || backgroundCurrentStationIndex >= stationList.size()-1) {
+ if (stationList == null || backgroundCurrentStationIndex >= stationList.size() - 1) {
return;
}
- BusStationBean currentStation = stationList.get( backgroundCurrentStationIndex);
- BusStationBean nextStation = stationList.get( backgroundCurrentStationIndex +1);
+ BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
+ BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
BusAnalyticsManager.getInstance().triggerUnableStartAPReasonEvent(
currentStation.getName(), nextStation.getName(), currentLineId,
OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason());
@@ -1002,7 +1003,7 @@ public class BusOrderModel {
private void updateAutopilotControlParameters() {
AutopilotControlParameters parameters = initAutopilotControlParameters(-1);
- if (null == parameters){
+ if (null == parameters) {
CallerLogger.INSTANCE.e(M_BUS + TAG, "AutopilotControlParameters is empty.");
return;
}
@@ -1010,7 +1011,7 @@ public class BusOrderModel {
CallerAutoPilotStatusListenerManager.INSTANCE.updateAutopilotControlParameters(parameters);
}
- private void clearAutopilotControlParameters(){
+ private void clearAutopilotControlParameters() {
CallerLogger.INSTANCE.d(M_BUS + TAG, "AutopilotControlParameters is clear.");
CallerAutoPilotStatusListenerManager.INSTANCE.updateAutopilotControlParameters(null);
}
@@ -1019,20 +1020,20 @@ public class BusOrderModel {
BusStationBean currentStation = null;
BusStationBean nextStation = null;
- if (leaveIndex < 0){
- if (backgroundCurrentStationIndex +1 > stationList.size() - 1 || !isGoingToNextStation){
+ if (leaveIndex < 0) {
+ if (backgroundCurrentStationIndex + 1 > stationList.size() - 1 || !isGoingToNextStation) {
CallerLogger.INSTANCE.e(M_BUS + TAG, "行程日志-mismatch condition1.");
return null;
}
- currentStation = stationList.get( backgroundCurrentStationIndex);
- nextStation = stationList.get( backgroundCurrentStationIndex + 1);
- }else {
- if (leaveIndex +1 > stationList.size() - 1 || !isGoingToNextStation){
+ currentStation = stationList.get(backgroundCurrentStationIndex);
+ nextStation = stationList.get(backgroundCurrentStationIndex + 1);
+ } else {
+ if (leaveIndex + 1 > stationList.size() - 1 || !isGoingToNextStation) {
CallerLogger.INSTANCE.e(M_BUS + TAG, "行程日志-mismatch condition2.");
return null;
}
- currentStation = stationList.get( leaveIndex);
- nextStation = stationList.get( leaveIndex + 1);
+ currentStation = stationList.get(leaveIndex);
+ nextStation = stationList.get(leaveIndex + 1);
}
AutopilotControlParameters parameters = new AutopilotControlParameters();
@@ -1041,9 +1042,9 @@ public class BusOrderModel {
parameters.startName = PinYinUtil.getPinYinHeadChar(currentStation.getName());
parameters.endName = PinYinUtil.getPinYinHeadChar(nextStation.getName());
parameters.startLatLon = new AutopilotControlParameters
- .AutoPilotLonLat( currentStation.getLat(), currentStation.getLon() );
+ .AutoPilotLonLat(currentStation.getLat(), currentStation.getLon());
parameters.endLatLon = new AutopilotControlParameters
- .AutoPilotLonLat( nextStation.getLat(), nextStation.getLon() );
+ .AutoPilotLonLat(nextStation.getLat(), nextStation.getLon());
parameters.vehicleType = VEHICLE_TYPE;
if (parameters.autoPilotLine == null) {
parameters.autoPilotLine = new AutopilotControlParameters.AutoPilotLine(
diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/OCHCommitDialog.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/OCHCommitDialog.kt
index 1e0fde8d5f..d11780d5dc 100644
--- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/OCHCommitDialog.kt
+++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/OCHCommitDialog.kt
@@ -3,13 +3,13 @@ package com.mogo.och.common.module.wigets
import android.content.Context
import android.widget.TextView
import androidx.lifecycle.LifecycleObserver
-import com.mogo.module.common.dialog.BaseFloatDialog
+import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
import com.mogo.och.common.module.R
/**
* 带有title, tip,confirm,cancel的dialog
*/
-class OCHCommitDialog: BaseFloatDialog, LifecycleObserver {
+class OCHCommitDialog: com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog, LifecycleObserver {
private var commonConfirm : TextView? = null
private var commonCancel : TextView? = null
diff --git a/OCH/mogo-och-noop/src/main/java/com/mogo/och/bus/MogoOCHNoop.java b/OCH/mogo-och-noop/src/main/java/com/mogo/och/bus/MogoOCHNoop.java
index 431a3a1992..b55de4fa57 100644
--- a/OCH/mogo-och-noop/src/main/java/com/mogo/och/bus/MogoOCHNoop.java
+++ b/OCH/mogo-och-noop/src/main/java/com/mogo/och/bus/MogoOCHNoop.java
@@ -7,8 +7,8 @@ import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.alibaba.android.arouter.facade.annotation.Route;
-import com.mogo.service.statusmanager.IMogoStatusChangedListener;
-import com.mogo.service.statusmanager.StatusDescriptor;
+import com.mogo.commons.module.status.IMogoStatusChangedListener;
+import com.mogo.commons.module.status.StatusDescriptor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
diff --git a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/MogoOCHTaxiPassenger.java b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/MogoOCHTaxiPassenger.java
index e633e71bb7..7dde2ad9e4 100644
--- a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/MogoOCHTaxiPassenger.java
+++ b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/MogoOCHTaxiPassenger.java
@@ -8,14 +8,13 @@ import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.alibaba.android.arouter.facade.annotation.Route;
+import com.mogo.commons.module.status.IMogoStatusChangedListener;
+import com.mogo.commons.module.status.MogoStatusManager;
+import com.mogo.commons.module.status.StatusDescriptor;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
-import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.map.MogoMapUIController;
-import com.mogo.module.common.MogoApisHandler;
import com.mogo.och.taxi.passenger.constant.TaxiPassengerConst;
import com.mogo.och.taxi.passenger.ui.TaxiPassengerBaseFragment;
-import com.mogo.service.statusmanager.IMogoStatusChangedListener;
-import com.mogo.service.statusmanager.StatusDescriptor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -27,26 +26,27 @@ public
*
* 网约车-出租车-乘客端
*/
-@Route( path = TaxiPassengerConst.PATH )
+@Route(path = TaxiPassengerConst.PATH)
class MogoOCHTaxiPassenger implements IMogoOCH, IMogoStatusChangedListener {
private static final String TAG = "MogoOCHTaxiPassenger";
private TaxiPassengerBaseFragment ochTaxiPassengerFragment;
private FragmentActivity mActivity;
private int mContainerId;
+
@Override
- public void init( Context context ) {
- CallerLogger.INSTANCE.d( M_TAXI_P + TAG, "init" );
- MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("ochTaxi", StatusDescriptor.VR_MODE,this);
+ public void init(Context context) {
+ CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "init");
+ MogoStatusManager.getInstance().registerStatusChangedListener("ochTaxi", StatusDescriptor.VR_MODE, this);
}
/**
* 进入鹰眼模式,设置手势缩放地图失效
*/
private void stepIntoVrMode() {
- CallerLogger.INSTANCE.d( M_TAXI_P + TAG, "进入vr模式" );
+ CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "进入vr模式");
MogoMapUIController.getInstance()
- .stepInVrMode( false );
+ .stepInVrMode(false);
}
private void showFragment() {
@@ -60,18 +60,18 @@ class MogoOCHTaxiPassenger implements IMogoOCH, IMogoStatusChangedListener {
mActivity.getSupportFragmentManager().beginTransaction().show(ochTaxiPassengerFragment).commitAllowingStateLoss();
}
- private void hideFragment(){
- if (ochTaxiPassengerFragment != null){
+ private void hideFragment() {
+ if (ochTaxiPassengerFragment != null) {
mActivity.getSupportFragmentManager().beginTransaction().hide(ochTaxiPassengerFragment).commitAllowingStateLoss();
}
}
@Override
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
- if (descriptor == StatusDescriptor.VR_MODE){
- if (isTrue){
+ if (descriptor == StatusDescriptor.VR_MODE) {
+ if (isTrue) {
showFragment();
- }else {
+ } else {
hideFragment();
}
}
@@ -101,6 +101,7 @@ class MogoOCHTaxiPassenger implements IMogoOCH, IMogoStatusChangedListener {
@Override
public void onDestroy() {
// 若不调用finish, 设置中打开关闭UITouch,会造成och fragment 重叠
+ MogoStatusManager.getInstance().unregisterStatusChangedListener("ochTaxi", StatusDescriptor.VR_MODE, this);
if (mActivity == null) return;
mActivity.finish();
}
diff --git a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java
index efe018353a..4561569f29 100644
--- a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java
+++ b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java
@@ -17,6 +17,9 @@ import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.module.intent.IMogoIntentListener;
import com.mogo.commons.module.intent.IntentManager;
+import com.mogo.commons.module.status.IMogoStatusChangedListener;
+import com.mogo.commons.module.status.MogoStatusManager;
+import com.mogo.commons.module.status.StatusDescriptor;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
@@ -59,8 +62,6 @@ import com.mogo.och.taxi.passenger.constant.TaxiPassengerOrderStatusEnum;
import com.mogo.och.taxi.passenger.network.TaxiPassengerServiceManager;
import com.mogo.aicloud.services.socket.IMogoLifecycleListener;
import com.mogo.och.taxi.passenger.utils.TaxiPassengerAnalyticsManager;
-import com.mogo.service.statusmanager.IMogoStatusChangedListener;
-import com.mogo.service.statusmanager.StatusDescriptor;
import org.jetbrains.annotations.NotNull;
@@ -230,10 +231,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
// 2021.11.1重构自动驾驶 实现接口 IMoGoAutopilotStatusListener 注册监听 替换IMogoAdasOCHCallback接口
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, mGoAutopilotStatusListener);
IntentManager.getInstance().registerIntentListener( ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
- MogoApisHandler.getInstance()
- .getApis()
- .getStatusManagerApi()
- .registerStatusChangedListener( TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener );
+ MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 达到起始站围栏监听
MogoApisHandler.getInstance()
.getApis()
@@ -248,10 +246,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
}
private void releaseListeners() {
- MogoApisHandler.getInstance()
- .getApis()
- .getStatusManagerApi()
- .unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
+ MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 注销到达起始站围栏监听
MogoApisHandler.getInstance()
diff --git a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/TaxiPassengerBaseFragment.java b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/TaxiPassengerBaseFragment.java
index 7a94a24cb3..24dfaeb355 100644
--- a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/TaxiPassengerBaseFragment.java
+++ b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/TaxiPassengerBaseFragment.java
@@ -12,7 +12,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentTransaction;
-import com.mogo.commons.AbsMogoApplication;
+import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.commons.mvp.MvpFragment;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy;
@@ -20,15 +20,11 @@ import com.mogo.eagle.core.function.api.hmi.view.IViewNotification;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
-import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.AiRoadMarker;
import com.mogo.eagle.core.utilcode.util.OverlayViewUtils;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.map.MogoMapUIController;
-import com.mogo.map.MogoMarkerManager;
import com.mogo.map.listener.IMogoMapListener;
import com.mogo.map.uicontroller.VisualAngleMode;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.module.common.constants.DataTypes;
import com.mogo.och.taxi.passenger.R;
import com.mogo.och.taxi.passenger.callback.ITPClickStartAutopilotCallback;
import com.mogo.och.taxi.passenger.event.UIStatus;
@@ -65,7 +61,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment mStartAutopilotView;
protected TaxiPassengerServingOrderFragment ochServingOrderFragment = null;
- private Handler mHandler = new Handler(Looper.getMainLooper());
+ private final Handler mHandler = new Handler(Looper.getMainLooper());
@Nullable
@Override
@@ -102,11 +98,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment
- if (descriptor == StatusDescriptor.MAIN_PAGE_IS_BACKGROUND) {
- dismiss()
+ private val statusChangedListenerForCheckNotice =
+ IMogoStatusChangedListener { descriptor, isTrue ->
+ if (descriptor == StatusDescriptor.MAIN_PAGE_IS_BACKGROUND) {
+ dismiss()
+ }
}
- }
init {
setContentView(R.layout.dialog_modify_bindingcar)
setCanceledOnTouchOutside(true)
confirmTv = findViewById(R.id.tv_bindingcar_confirm)
- cancleTv = findViewById(R.id.tv_bindingcar_cancel)
+ cancelTv = findViewById(R.id.tv_bindingcar_cancel)
confirmTv?.setOnClickListener {
modifyBindingcar()
}
- cancleTv?.setOnClickListener {
+ cancelTv?.setOnClickListener {
dismiss()
}
+
+ MogoStatusManager.getInstance().registerStatusChangedListener(
+ TAG,
+ StatusDescriptor.MAIN_PAGE_IS_BACKGROUND,
+ statusChangedListenerForCheckNotice
+ )
}
/**
@@ -62,6 +67,11 @@ class ModifyBindingCarDialog(context: Context) : BaseFloatDialog(context), Lifec
override fun dismiss() {
super.dismiss()
+ MogoStatusManager.getInstance().unregisterStatusChangedListener(
+ TAG,
+ StatusDescriptor.MAIN_PAGE_IS_BACKGROUND,
+ statusChangedListenerForCheckNotice
+ )
}
fun showModifyBindingcarDialog() {
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/bindingcar/ToBindingCarDialog.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/bindingcar/ToBindingCarDialog.kt
index 6d38ac8373..e737eff6f8 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/bindingcar/ToBindingCarDialog.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/bindingcar/ToBindingCarDialog.kt
@@ -3,13 +3,13 @@ package com.mogo.eagle.core.function.hmi.ui.bindingcar
import android.content.Context
import android.widget.TextView
import androidx.lifecycle.LifecycleObserver
+import com.mogo.commons.module.status.IMogoStatusChangedListener
+import com.mogo.commons.module.status.MogoStatusManager
+import com.mogo.commons.module.status.StatusDescriptor
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
-import com.mogo.module.common.dialog.BaseFloatDialog
-import com.mogo.service.IMogoServiceApis
-import com.mogo.service.statusmanager.IMogoStatusChangedListener
-import com.mogo.service.statusmanager.StatusDescriptor
+import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
/**
@@ -20,9 +20,8 @@ class ToBindingCarDialog(context: Context) : BaseFloatDialog(context), Lifecycle
private val TAG = "ToBindingCarDialog"
private var confirmTv: TextView? = null
- private var cancleTv: TextView? = null
+ private var cancelTv: TextView? = null
- private var mServiceApis: IMogoServiceApis? = null
private val statusChangedListenerForCheckNotice = IMogoStatusChangedListener { descriptor, isTrue ->
if (descriptor == StatusDescriptor.MAIN_PAGE_IS_BACKGROUND) {
dismiss()
@@ -34,15 +33,21 @@ class ToBindingCarDialog(context: Context) : BaseFloatDialog(context), Lifecycle
setCanceledOnTouchOutside(true)
confirmTv = findViewById(R.id.tv_to_bindingcar_confirm)
- cancleTv = findViewById(R.id.tv_to_bindingcar_cancel)
+ cancelTv = findViewById(R.id.tv_to_bindingcar_cancel)
confirmTv?.setOnClickListener {
toBindingcar()
}
- cancleTv?.setOnClickListener {
+ cancelTv?.setOnClickListener {
dismiss()
}
+
+ MogoStatusManager.getInstance().registerStatusChangedListener(
+ TAG,
+ StatusDescriptor.MAIN_PAGE_IS_BACKGROUND,
+ statusChangedListenerForCheckNotice
+ )
}
/**
@@ -61,6 +66,11 @@ class ToBindingCarDialog(context: Context) : BaseFloatDialog(context), Lifecycle
override fun dismiss() {
super.dismiss()
+ MogoStatusManager.getInstance().unregisterStatusChangedListener(
+ TAG,
+ StatusDescriptor.MAIN_PAGE_IS_BACKGROUND,
+ statusChangedListenerForCheckNotice
+ )
}
fun showToBindingcarDialog() {
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/bindingcar/UpgradeAppDialog.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/bindingcar/UpgradeAppDialog.kt
index 3f2319fb5e..701fac27a8 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/bindingcar/UpgradeAppDialog.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/bindingcar/UpgradeAppDialog.kt
@@ -1,24 +1,19 @@
package com.mogo.eagle.core.function.hmi.ui.bindingcar
import android.content.Context
-import android.opengl.Visibility
-import android.util.Log
import android.view.View
import android.widget.TextView
import androidx.lifecycle.LifecycleObserver
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.ToastUtils
-import com.mogo.module.common.dialog.BaseFloatDialog
-import com.mogo.service.IMogoServiceApis
-import com.mogo.service.statusmanager.IMogoStatusChangedListener
-import com.mogo.service.statusmanager.StatusDescriptor
+import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
/**
* @brief APP升级提示弹框
* @author lixiaopeng
*/
-class UpgradeAppDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver{
+class UpgradeAppDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver {
private val TAG = "UpgradeAppDialog"
private var confirmTv: TextView? = null
@@ -70,7 +65,13 @@ class UpgradeAppDialog(context: Context) : BaseFloatDialog(context), LifecycleOb
}
// 升级类型 1:提示升级 2:静默升级 3:强制升级
- fun showUpgradeAppDialog(name: String, url: String, title: String, content: String, installType: String) {
+ fun showUpgradeAppDialog(
+ name: String,
+ url: String,
+ title: String,
+ content: String,
+ installType: String
+ ) {
if (isShowing) {
return
}
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/camera/RoadVideoDialog.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/camera/RoadVideoDialog.kt
index a13bd5b52f..b3956d1659 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/camera/RoadVideoDialog.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/camera/RoadVideoDialog.kt
@@ -13,7 +13,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer
-import com.mogo.module.common.dialog.BaseFloatDialog
+import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
import com.shuyu.gsyvideoplayer.GSYVideoManager
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
import com.shuyu.gsyvideoplayer.model.VideoOptionModel
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeCheckDialog.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeCheckDialog.kt
index 609c34afd8..ae92070f39 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeCheckDialog.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeCheckDialog.kt
@@ -7,6 +7,9 @@ import android.view.View
import android.widget.ImageView
import android.widget.TextView
import androidx.lifecycle.LifecycleObserver
+import com.mogo.commons.module.status.IMogoStatusChangedListener
+import com.mogo.commons.module.status.MogoStatusManager
+import com.mogo.commons.module.status.StatusDescriptor
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
import com.mogo.eagle.core.data.notice.NoticeNormalData
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
@@ -15,11 +18,8 @@ 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
import com.mogo.eagle.core.widget.media.video.NoticeSimpleVideoPlayer
-import com.mogo.module.common.MogoApisHandler
-import com.mogo.module.common.dialog.BaseFloatDialog
+import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
import com.mogo.service.IMogoServiceApis
-import com.mogo.service.statusmanager.IMogoStatusChangedListener
-import com.mogo.service.statusmanager.StatusDescriptor
import com.shuyu.gsyvideoplayer.GSYVideoManager
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
import com.shuyu.gsyvideoplayer.listener.VideoAllCallBack
@@ -94,13 +94,13 @@ class NoticeCheckDialog(context: Context) : BaseFloatDialog(context), LifecycleO
playVideo(mVideoUrl)
}
- mServiceApis = MogoApisHandler.getInstance().apis
- mServiceApis?.statusManagerApi?.registerStatusChangedListener(TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForCheckNotice)
+ MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForCheckNotice)
}
override fun dismiss() {
super.dismiss()
+ MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForCheckNotice)
stopLive()
}
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeTrafficDialog.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeTrafficDialog.java
index 3283441e03..1d52222fca 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeTrafficDialog.java
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeTrafficDialog.java
@@ -15,27 +15,25 @@ import androidx.recyclerview.widget.StaggeredGridLayoutManager;
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
+import com.mogo.commons.module.status.IMogoStatusChangedListener;
+import com.mogo.commons.module.status.MogoStatusManager;
+import com.mogo.commons.module.status.StatusDescriptor;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.eagle.core.data.notice.NoticeTrafficStyleInfo;
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData;
import com.mogo.eagle.core.data.notice.NoticeValue;
-import com.mogo.eagle.core.function.api.notice.NoticeNetCallBack;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
-import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.call.notice.CallerNoticeManager;
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;
+import com.mogo.eagle.core.utilcode.mogo.imageloader.MogoImageView;
+import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.BitmapHelper;
import com.mogo.eagle.core.utilcode.util.DateTimeUtils;
import com.mogo.eagle.core.widget.media.video.NoticeSimpleSmallVideoPlayer;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.module.common.dialog.BaseFloatDialog;
-import com.mogo.service.IMogoServiceApis;
-import com.mogo.eagle.core.utilcode.mogo.imageloader.MogoImageView;
-import com.mogo.service.statusmanager.IMogoStatusChangedListener;
-import com.mogo.service.statusmanager.StatusDescriptor;
+import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog;
import com.shuyu.gsyvideoplayer.GSYVideoManager;
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
import com.shuyu.gsyvideoplayer.listener.VideoAllCallBack;
@@ -64,9 +62,8 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
private TextView refuse;//拒绝
private TextView connect;//连接
private NoticeTrafficAdapter adapter;
- private final ArrayList dataArrayList = new ArrayList();
+ private final ArrayList dataArrayList = new ArrayList<>();
private NoticeTrafficStyleInfo.NoticeTrafficAccountInfo mTrafficStyleInfo;
- private IMogoServiceApis mServiceApis;
public NoticeTrafficDialog(@NonNull Context context, NoticeTrafficStylePushData pushData) {
super(context);
@@ -84,8 +81,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
setCanceledOnTouchOutside(true);
playerShow();//视频播放器及接操作按钮
recyclerVie();//详情信息列表
- mServiceApis = MogoApisHandler.getInstance().getApis();
- mServiceApis.getStatusManagerApi().registerStatusChangedListener(M_HMI + TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForNotice);
+ MogoStatusManager.getInstance().registerStatusChangedListener(M_HMI + TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForNotice);
}
/**
@@ -169,7 +165,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
* 开启自动驾驶
*/
private void startAutoPilot() {
- if (mTrafficStyleInfo != null){
+ if (mTrafficStyleInfo != null) {
AutopilotControlParameters parameters = new AutopilotControlParameters();
parameters.isSpeakVoice = false;
parameters.vehicleType = 10;
@@ -356,13 +352,10 @@ 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(), new NoticeNetCallBack() {
- @Override
- public void callBackWithResult(NoticeTrafficStyleInfo trafficInfo) {
- CallerLogger.INSTANCE.d(M_HMI + TAG, "交通事故详情::" + trafficInfo);
- mTrafficStyleInfo = trafficInfo.getResult().getAccidentInfo();
- infoRefresh(mTrafficStyleInfo);
- }
+ CallerNoticeManager.getNoticeProvider().requestAccidentInfo(mPushData.getInfoId(), MoGoAiCloudClientConfig.getInstance().getSn(), trafficInfo -> {
+ CallerLogger.INSTANCE.d(M_HMI + TAG, "交通事故详情::" + trafficInfo);
+ mTrafficStyleInfo = trafficInfo.getResult().getAccidentInfo();
+ infoRefresh(mTrafficStyleInfo);
});
}
@@ -445,6 +438,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
public void dismiss() {
super.dismiss();
CallerLogger.INSTANCE.d(M_HMI + TAG, "trafficDialog dismiss");
+ MogoStatusManager.getInstance().unregisterStatusChangedListener(M_HMI + TAG, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, statusChangedListenerForNotice);
releasePlayer();
}
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
index 4a764781c9..d61c25614f 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
@@ -74,7 +74,7 @@ import com.mogo.map.MogoMap
import com.mogo.map.MogoMapUIController
import com.mogo.map.uicontroller.VisualAngleMode
import com.mogo.map.uicontroller.VisualAngleMode.*
-import com.mogo.module.service.routeoverlay.*
+import com.mogo.eagle.core.function.business.routeoverlay.*
import com.zhidao.easysocket.utils.L
import com.zhidao.support.adas.high.other.permission.BackgrounderPermission
import com.zhjt.mogo_core_function_devatools.env.*
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt
index f26a810247..74fb004450 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt
@@ -16,8 +16,7 @@ import com.mogo.eagle.core.function.call.obu.CallerOBUManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
-import com.mogo.module.service.routeoverlay.RouteStrategy
-import kotlinx.android.synthetic.main.view_debug_setting.view.*
+import com.mogo.eagle.core.function.business.routeoverlay.RouteStrategy
import kotlinx.android.synthetic.main.view_sop_setting.view.*
import kotlinx.android.synthetic.main.view_sop_setting.view.tbRouteDynamicEffect
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AdUpgradeDialog.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AdUpgradeDialog.kt
index d4abbc8aac..de7c4e75b8 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AdUpgradeDialog.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AdUpgradeDialog.kt
@@ -4,7 +4,7 @@ import android.content.Context
import android.widget.TextView
import androidx.lifecycle.LifecycleObserver
import com.mogo.eagle.core.function.hmi.R
-import com.mogo.module.common.dialog.BaseFloatDialog
+import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
/**
* @author XuXinChao
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/DockerRebootDialog.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/DockerRebootDialog.kt
index 831b2716fe..e4ed66d642 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/DockerRebootDialog.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/DockerRebootDialog.kt
@@ -4,7 +4,7 @@ import android.content.Context
import android.widget.TextView
import androidx.lifecycle.LifecycleObserver
import com.mogo.eagle.core.function.hmi.R
-import com.mogo.module.common.dialog.BaseFloatDialog
+import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
/**
* @author XuXinChao
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.java
index 80f06dd994..7dc5338c6a 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.java
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainActivity.java
@@ -31,6 +31,7 @@ import com.kwai.koom.nativeoom.leakmonitor.LeakRecord;
import com.mogo.commons.analytics.AnalyticsUtils;
import com.mogo.commons.context.ContextHolderUtil;
import com.mogo.commons.debug.DebugConfig;
+import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.commons.mvp.BaseFragment;
import com.mogo.commons.mvp.MvpActivity;
import com.mogo.commons.mvp.MvpFragment;
@@ -61,7 +62,6 @@ import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.service.IMogoServiceApis;
-import com.mogo.service.statusmanager.IMogoStatusManager;
import com.rousetime.android_startup.StartupManager;
import com.rousetime.android_startup.model.LoggerLevel;
import com.rousetime.android_startup.model.StartupConfig;
@@ -91,7 +91,6 @@ public class MainActivity extends MvpActivity implement
private static final int REQUEST_CODE_DIALOG = 100;
protected IMogoServiceApis mServiceApis;
- protected IMogoStatusManager mMogoStatusManager;
protected FrameLayout mFloatingLayout;
protected View mCoverUpLayout;
@@ -102,7 +101,7 @@ public class MainActivity extends MvpActivity implement
private RecyclerView mConnectInfoRV;
private ConnInfoAdapter mConnAdapter;
- private List dataList = new ArrayList<>();
+ private final List dataList = new ArrayList<>();
private int mLastStatus = 0x00;
private boolean isFloatingLayerHidden = false;
@@ -225,8 +224,7 @@ public class MainActivity extends MvpActivity implement
if (mServiceApis == null) {
mServiceApis = MogoApisHandler.getInstance().getApis();
}
- mMogoStatusManager = mServiceApis.getStatusManagerApi();
- mMogoStatusManager.setMainPageLaunchedStatus(TAG, true);
+ MogoStatusManager.getInstance().setMainPageLaunchedStatus(TAG, true);
}
private void initConnectInfoRV() {
@@ -274,7 +272,7 @@ public class MainActivity extends MvpActivity implement
loadFunctionFragment();
// TODO 这里临时兼容进入VR模式,标记状态机。有些业务(OCH)会根据状态判断加载
- MogoApisHandler.getInstance().getApis().getStatusManagerApi().setVrMode(TAG, true);
+ MogoStatusManager.getInstance().setVrMode(TAG, true);
// 设置地图样式
MogoMapListenerHandler.getInstance().onMapModeChanged(EnumMapUI.MAP_STYLE_DAY_VR);
});
@@ -394,23 +392,20 @@ public class MainActivity extends MvpActivity implement
@Override
protected void onResume() {
super.onResume();
- mMogoStatusManager.setMainPageResumeStatus(TAG, true);
- mMogoStatusManager.setMainPageIsBackgroundStatus(TAG, false);
+ MogoStatusManager.getInstance().setMainPageResumeStatus(TAG, true);
+ MogoStatusManager.getInstance().setMainPageIsBackgroundStatus(TAG, true);
}
@Override
protected void onPause() {
super.onPause();
- mMogoStatusManager.setMainPageResumeStatus(TAG, false);
+ MogoStatusManager.getInstance().setMainPageResumeStatus(TAG, false);
}
-
@Override
protected void onStop() {
super.onStop();
- if (mMogoStatusManager != null) {
- mMogoStatusManager.setMainPageIsBackgroundStatus(TAG, true);
- }
+ MogoStatusManager.getInstance().setMainPageIsBackgroundStatus(TAG, true);
}
@Override
@@ -481,13 +476,13 @@ public class MainActivity extends MvpActivity implement
listenerRegister.unregisterMarkerClickListener();
listenerRegister.unregisterHostMapListener();
}
- mMogoStatusManager.setMainPageLaunchedStatus(TAG, false);
- mMogoStatusManager.setMainPageIsBackgroundStatus(TAG, false);
-
IMogoMapUIController mapUIController = CallerMapUIServiceManager.INSTANCE.getMapUIController();
if (mapUIController != null) {
mapUIController.destroy();
}
+ MogoStatusManager.getInstance().setMainPageLaunchedStatus(TAG, false);
+ MogoStatusManager.getInstance().setMainPageIsBackgroundStatus(TAG, false);
+
CallerLogger.INSTANCE.d(M_HMI + TAG, "destroy.");
ContextHolderUtil.releaseContext();
MogoModulesManager.getInstance().onDestroy();
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java
index 5c7c2eca3b..35d2c6ba18 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java
@@ -26,7 +26,6 @@ import com.mogo.eagle.core.utilcode.util.ProcessUtils;
import com.mogo.map.MapApiPath;
import com.mogo.module.common.MogoModule;
import com.mogo.module.common.MogoModulePaths;
-import com.mogo.module.service.ServiceConst;
import com.zhidao.support.obu.ami.AmiClientManager;
import com.zhjt.mogo_core_function_devatools.monitor.db.CpuInfo;
import com.zhjt.mogo_core_function_devatools.monitor.db.MemInfo;
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/MapPointCloudSubscriber.kt
similarity index 98%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/MapPointCloudSubscriber.kt
index f49b4d1804..55abf0e583 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/MapPointCloudSubscriber.kt
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.function.map
+package com.mogo.eagle.core.function.business
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/collect/MoGoMapDataCollectProvider.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/collect/MoGoMapDataCollectProvider.kt
similarity index 99%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/collect/MoGoMapDataCollectProvider.kt
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/collect/MoGoMapDataCollectProvider.kt
index 5a502c897f..5b9ea36461 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/collect/MoGoMapDataCollectProvider.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/collect/MoGoMapDataCollectProvider.kt
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.function.impl.collect
+package com.mogo.eagle.core.function.business.collect
import android.content.Context
import android.text.TextUtils
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/CircleQueue.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/CircleQueue.java
similarity index 95%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/CircleQueue.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/CircleQueue.java
index 5673c2ed2d..5f7b50180e 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/CircleQueue.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/CircleQueue.java
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.function.map.identify;
+package com.mogo.eagle.core.function.business.identify;
import java.util.List;
import java.util.Vector;
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/Identify.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/Identify.kt
similarity index 88%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/Identify.kt
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/Identify.kt
index 53f3dfac50..e3ba3c913b 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/Identify.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/Identify.kt
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.function.map.identify
+package com.mogo.eagle.core.function.business.identify
import com.mogo.eagle.core.data.traffic.TrafficData
import mogo.telematics.pad.MessagePad
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/IdentifyBeautifyDataDrawer.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/IdentifyBeautifyDataDrawer.kt
similarity index 91%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/IdentifyBeautifyDataDrawer.kt
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/IdentifyBeautifyDataDrawer.kt
index 3af4a12431..aa8a35caf9 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/IdentifyBeautifyDataDrawer.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/IdentifyBeautifyDataDrawer.kt
@@ -1,11 +1,11 @@
-package com.mogo.eagle.core.function.map.identify
+package com.mogo.eagle.core.function.business.identify
import android.annotation.SuppressLint
import com.mogo.commons.AbsMogoApplication
+import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.eagle.core.data.traffic.TrafficData
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.w
import com.mogo.map.MogoMarkerManager
-import com.mogo.module.common.MogoApisHandler
import mogo.telematics.pad.MessagePad
import mogo.telematics.pad.MessagePad.TrackedObject
@@ -38,7 +38,7 @@ class IdentifyBeautifyDataDrawer : Identify {
w(TAG, "感知数据为空无需渲染……")
return
}
- if (!MogoApisHandler.getInstance().apis.statusManagerApi.isVrMode) {
+ if (!MogoStatusManager.getInstance().isVrMode) {
TrackManager.getInstance().clearAll()
w(TAG, "渲染 adas 识别的数据 当前不是VR模式")
return
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/IdentifyFactory.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/IdentifyFactory.kt
similarity index 98%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/IdentifyFactory.kt
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/IdentifyFactory.kt
index b68a400241..78e56df4f0 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/IdentifyFactory.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/IdentifyFactory.kt
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.function.map.identify
+package com.mogo.eagle.core.function.business.identify
import android.os.Handler
import android.os.Message
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/IdentifyOriginDataDrawer.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/IdentifyOriginDataDrawer.kt
similarity index 96%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/IdentifyOriginDataDrawer.kt
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/IdentifyOriginDataDrawer.kt
index d4c3e3d62b..462ca8533e 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/IdentifyOriginDataDrawer.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/IdentifyOriginDataDrawer.kt
@@ -1,12 +1,12 @@
-package com.mogo.eagle.core.function.map.identify
+package com.mogo.eagle.core.function.business.identify
import android.annotation.SuppressLint
import androidx.collection.ArraySet
import com.mogo.commons.AbsMogoApplication
+import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.eagle.core.data.traffic.TrafficData
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.w
import com.mogo.map.MogoMarkerManager
-import com.mogo.module.common.MogoApisHandler
import mogo.telematics.pad.MessagePad.PlanningObject
import mogo.telematics.pad.MessagePad.TrackedObject
import java.util.concurrent.ConcurrentHashMap
@@ -60,7 +60,7 @@ class IdentifyOriginDataDrawer : Identify {
w(TAG, "感知数据为空无需渲染……")
return
}
- if (!MogoApisHandler.getInstance().apis.statusManagerApi.isVrMode) {
+ if (!MogoStatusManager.getInstance().isVrMode) {
clearOldMarker()
w(TAG, "渲染 adas 识别的数据 当前不是VR模式")
return
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/KalmanFilter.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/KalmanFilter.java
similarity index 96%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/KalmanFilter.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/KalmanFilter.java
index 5c55acd4ee..eae66e846c 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/KalmanFilter.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/KalmanFilter.java
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.function.map.identify;
+package com.mogo.eagle.core.function.business.identify;
public class KalmanFilter {
private final double q = 1.0E-6D;
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapIdentifySubscriber.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/MapIdentifySubscriber.kt
similarity index 95%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapIdentifySubscriber.kt
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/MapIdentifySubscriber.kt
index ef9648297a..d9a344ec2e 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapIdentifySubscriber.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/MapIdentifySubscriber.kt
@@ -1,10 +1,9 @@
-package com.mogo.eagle.core.function.map
+package com.mogo.eagle.core.function.business.identify
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
import com.mogo.eagle.core.function.api.base.IMoGoSubscriber
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
-import com.mogo.eagle.core.function.map.identify.IdentifyFactory
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import mogo.telematics.pad.MessagePad
import mogo.telematics.pad.MessagePad.TrackedObject
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/ObjQueue.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/ObjQueue.java
similarity index 95%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/ObjQueue.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/ObjQueue.java
index 0835a5ea5a..5a22cac04a 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/ObjQueue.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/ObjQueue.java
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.function.map.identify;
+package com.mogo.eagle.core.function.business.identify;
public class ObjQueue {
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/PlanningTrack.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/PlanningTrack.kt
similarity index 54%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/PlanningTrack.kt
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/PlanningTrack.kt
index c6b4c2ce6c..2b6fbe95fb 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/PlanningTrack.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/PlanningTrack.kt
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.function.map.identify
+package com.mogo.eagle.core.function.business.identify
data class PlanningTrack(var color: String, var time: Double) {
}
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackManager.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackManager.java
similarity index 99%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackManager.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackManager.java
index 9f78e3575f..80cb953c1c 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackManager.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackManager.java
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.function.map.identify;
+package com.mogo.eagle.core.function.business.identify;
import android.annotation.SuppressLint;
import android.os.Build;
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackObj.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackObj.java
similarity index 98%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackObj.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackObj.java
index d903e835b4..2048c4f06a 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackObj.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackObj.java
@@ -1,9 +1,8 @@
-package com.mogo.eagle.core.function.map.identify;
+package com.mogo.eagle.core.function.business.identify;
-import static com.mogo.eagle.core.function.map.identify.TrackManager.LIMIT_SPEED;
+import static com.mogo.eagle.core.function.business.identify.TrackManager.LIMIT_SPEED;
import android.annotation.SuppressLint;
-import android.util.Log;
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.eagle.core.data.enums.TrafficTypeEnum;
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackerSourceHelper.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceHelper.kt
similarity index 98%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackerSourceHelper.kt
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceHelper.kt
index 0b80a57e4a..4459ae0489 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/TrackerSourceHelper.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceHelper.kt
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.function.map.identify
+package com.mogo.eagle.core.function.business.identify
import android.annotation.SuppressLint
import com.mogo.eagle.core.data.config.FunctionBuildConfig
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/WarningHelper.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/WarningHelper.kt
similarity index 97%
rename from core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/WarningHelper.kt
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/WarningHelper.kt
index b678996dd2..2d7a5c69a4 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/WarningHelper.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/WarningHelper.kt
@@ -1,13 +1,11 @@
-package com.mogo.eagle.core.function.map.identify
+package com.mogo.eagle.core.function.business.identify
import android.annotation.SuppressLint
import com.mogo.eagle.core.data.config.FunctionBuildConfig
-import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.FOUNDATION
import com.mogo.eagle.core.data.traffic.TrafficData
import com.mogo.eagle.core.data.traffic.threatLevelColor
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getCurWgs84SatelliteTime
-import com.zhjt.service_biz.BizConfig
import mogo.telematics.pad.MessagePad
import mogo.telematics.pad.MessagePad.PlanningObject
import java.util.concurrent.ConcurrentHashMap
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/MogoRouteOverlayManager.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java
similarity index 98%
rename from modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/MogoRouteOverlayManager.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java
index 5506928df5..44d7613432 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/MogoRouteOverlayManager.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/MogoRouteOverlayManager.java
@@ -1,4 +1,4 @@
-package com.mogo.module.service.routeoverlay;
+package com.mogo.eagle.core.function.business.routeoverlay;
import androidx.annotation.NonNull;
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/RouteOverlayDrawer.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/RouteOverlayDrawer.java
similarity index 97%
rename from modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/RouteOverlayDrawer.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/RouteOverlayDrawer.java
index 01076f6084..b4399622d8 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/RouteOverlayDrawer.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/RouteOverlayDrawer.java
@@ -1,17 +1,13 @@
-package com.mogo.module.service.routeoverlay;
+package com.mogo.eagle.core.function.business.routeoverlay;
-import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_OLD_ROUTE;
import android.annotation.SuppressLint;
import android.graphics.Color;
import android.os.Handler;
import android.os.HandlerThread;
-import android.os.SystemClock;
import android.util.Log;
import androidx.core.util.Pools;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
-import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
-import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
import com.mogo.map.MogoOverlayManager;
import com.mogo.map.overlay.IMogoOverlayManager;
import com.mogo.map.overlay.IMogoPolyline;
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/RouteStrategy.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/RouteStrategy.kt
similarity index 91%
rename from modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/RouteStrategy.kt
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/RouteStrategy.kt
index 6044dd58d7..9da60d4c24 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/routeoverlay/RouteStrategy.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/routeoverlay/RouteStrategy.kt
@@ -1,14 +1,14 @@
-package com.mogo.module.service.routeoverlay
+package com.mogo.eagle.core.function.business.routeoverlay
import android.animation.*
import android.graphics.*
import android.view.animation.*
import com.mogo.eagle.core.data.config.*
import com.mogo.eagle.core.utilcode.mogo.*
-import com.mogo.module.service.routeoverlay.Colors.Companion.COLOR_BLUE
-import com.mogo.module.service.routeoverlay.Colors.Companion.COLOR_BLUE_DARK
-import com.mogo.module.service.routeoverlay.Colors.Companion.COLOR_RED_DARK
-import com.mogo.module.service.routeoverlay.Colors.Companion.COLOR_TRANSPARENT
+import com.mogo.eagle.core.function.business.routeoverlay.Colors.Companion.COLOR_BLUE
+import com.mogo.eagle.core.function.business.routeoverlay.Colors.Companion.COLOR_BLUE_DARK
+import com.mogo.eagle.core.function.business.routeoverlay.Colors.Companion.COLOR_RED_DARK
+import com.mogo.eagle.core.function.business.routeoverlay.Colors.Companion.COLOR_TRANSPARENT
import java.util.*
import kotlin.collections.ArrayList
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/MogoMapService.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/MogoMapService.java
index 739b98f04f..8bd5018572 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/MogoMapService.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/MogoMapService.java
@@ -6,7 +6,6 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths;
import com.mogo.eagle.core.function.api.map.IMogoMapService;
import com.mogo.eagle.core.function.api.map.marker.IMogoMarkerService;
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
-import com.mogo.eagle.core.function.marker.MogoMarkerServiceImpl;
import com.mogo.map.MogoGeoSearch;
import com.mogo.map.MogoLocationClient;
import com.mogo.map.MogoMap;
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/MogoMarkerServiceImpl.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/MogoMarkerServiceImpl.java
new file mode 100644
index 0000000000..517c1e298d
--- /dev/null
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/MogoMarkerServiceImpl.java
@@ -0,0 +1,79 @@
+package com.mogo.eagle.core.function.impl;
+
+import androidx.annotation.Nullable;
+
+import com.mogo.eagle.core.data.map.MogoLatLng;
+import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
+import com.mogo.eagle.core.data.traffic.TrafficData;
+import com.mogo.eagle.core.function.api.map.marker.IMogoMarkerService;
+import com.mogo.eagle.core.function.impl.marker.MarkerDrawer;
+import com.mogo.eagle.core.function.impl.marker.TrafficMarkerDrawer;
+import com.mogo.eagle.core.function.impl.marker.V2XWarnDataDrawer;
+import com.mogo.map.marker.IMogoMarker;
+
+
+public class MogoMarkerServiceImpl implements IMogoMarkerService {
+
+ private static volatile MogoMarkerServiceImpl sInstance;
+ private static final byte[] obj = new byte[0];
+
+ private MogoMarkerServiceImpl() {
+
+ }
+
+ public static MogoMarkerServiceImpl getInstance() {
+ if (sInstance == null) {
+ synchronized (obj) {
+ if (sInstance == null) {
+ sInstance = new MogoMarkerServiceImpl();
+ }
+ }
+ }
+ return sInstance;
+ }
+
+ @Nullable
+ @Override
+ public IMogoMarker drawMarker(Object object) {
+ if (object instanceof MarkerShowEntity) {
+ return MarkerDrawer.getInstance().drawMapMarkerImpl(((MarkerShowEntity) object), MarkerDrawer.MARKER_Z_INDEX_HIGH, null);
+ }
+ return null;
+ }
+
+ @Override
+ public void renderWarningMoveMarker(double lon, double lat, int type, double collisionlat, double collisionLon, double angle, long showTime) {
+ V2XWarnDataDrawer.getInstance().renderWarnData(lon, lat, type, collisionlat, collisionLon, angle, showTime);
+ }
+
+ @Override
+ public void renderStopLineMarker(double lon, double lat) {
+ V2XWarnDataDrawer.getInstance().renderStopLineData(lon, lat);
+ }
+
+ @Override
+ public void drawerArrowsMarkerWithLocation(MogoLatLng location, String markerType, int type, int rotate) {
+ V2XWarnDataDrawer.getInstance().drawerArrowsMarkerWithLocation(location, markerType, type, rotate);
+ }
+
+ @Override
+ public void updateITrafficInfo(TrafficData trafficData) {
+ TrafficMarkerDrawer.INSTANCE.updateITrafficInfo(trafficData);
+ }
+
+ @Override
+ public void updateITrafficLocationInfo(TrafficData trafficData) {
+ TrafficMarkerDrawer.INSTANCE.updateITrafficLocationInfo(trafficData);
+ }
+
+ @Override
+ public void updateITrafficThreatLevelInfo(TrafficData trafficData) {
+ TrafficMarkerDrawer.INSTANCE.updateITrafficThreatLevelInfo(trafficData);
+ }
+
+ @Override
+ public void removeCvxRvInfoIndInfo(String uuid) {
+ TrafficMarkerDrawer.INSTANCE.removeCvxRvInfoIndInfo(uuid);
+ }
+
+}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/AdasRecognizedType.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/AdasRecognizedType.java
similarity index 96%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/AdasRecognizedType.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/AdasRecognizedType.java
index f12eac0af7..17da52fab1 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/AdasRecognizedType.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/AdasRecognizedType.java
@@ -1,4 +1,4 @@
-package com.mogo.module.common.constants;
+package com.mogo.eagle.core.function.impl.marker;
public enum AdasRecognizedType {
//背景
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/BaseDrawer.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/BaseDrawer.java
similarity index 94%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/BaseDrawer.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/BaseDrawer.java
index d4f16fb420..3eee9cee29 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/BaseDrawer.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/BaseDrawer.java
@@ -1,11 +1,10 @@
-package com.mogo.module.common.drawer;
+package com.mogo.eagle.core.function.impl.marker;
import android.content.Context;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.module.common.R;
-import com.mogo.module.common.constants.AdasRecognizedType;
/**
* @author congtaowang
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/EmptyMarkerView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/EmptyMarkerView.java
similarity index 94%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/EmptyMarkerView.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/EmptyMarkerView.java
index be4771ae5a..33df70ab27 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/EmptyMarkerView.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/EmptyMarkerView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.common.drawer.marker;
+package com.mogo.eagle.core.function.impl.marker;
import android.content.Context;
import android.util.AttributeSet;
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/IMarkerView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/IMarkerView.java
similarity index 87%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/IMarkerView.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/IMarkerView.java
index e4b0892d4e..9f8a8ae9ae 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/IMarkerView.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/IMarkerView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.common.drawer.marker;
+package com.mogo.eagle.core.function.impl.marker;
import android.graphics.Bitmap;
import android.view.View;
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapCameraInfoView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapCameraInfoView.java
similarity index 92%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapCameraInfoView.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapCameraInfoView.java
index c0fb27dec9..0d13d26fc5 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapCameraInfoView.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapCameraInfoView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.common.drawer.marker;
+package com.mogo.eagle.core.function.impl.marker;
import android.content.Context;
import android.util.AttributeSet;
@@ -8,9 +8,9 @@ import android.widget.ImageView;
import androidx.annotation.Nullable;
+import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.module.common.R;
-import com.mogo.module.common.entity.MarkerShowEntity;
/**
* author : 李小鹏
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerAdapter.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapMarkerAdapter.java
similarity index 74%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerAdapter.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapMarkerAdapter.java
index 9316277041..6a1dd4c797 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerAdapter.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapMarkerAdapter.java
@@ -1,12 +1,12 @@
-package com.mogo.module.common.drawer.marker;
+package com.mogo.eagle.core.function.impl.marker;
import android.content.Context;
import android.text.TextUtils;
+import com.mogo.commons.module.status.MogoStatusManager;
+import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.module.common.ModuleNames;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.module.common.entity.MarkerShowEntity;
/**
* author : donghongyu
@@ -24,12 +24,12 @@ public class MapMarkerAdapter {
* @param markerShowEntity 要填充的数据
* @return MarkerView
*/
- public static IMarkerView getMarkerView( Context context, MarkerShowEntity markerShowEntity, MogoMarkerOptions options ) {
+ public static IMarkerView getMarkerView(Context context, MarkerShowEntity markerShowEntity, MogoMarkerOptions options ) {
if ( TextUtils.equals( markerShowEntity.getMarkerType(), ModuleNames.CARD_TYPE_USER_DATA ) ) {
return OnlineCarMarkerView.getInstance();
} else {
- if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
+ if ( MogoStatusManager.getInstance().isVrMode() ) {
return new EmptyMarkerView( context );
} else {
if ( markerShowEntity.isChecked() ) {
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerBaseView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapMarkerBaseView.java
similarity index 97%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerBaseView.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapMarkerBaseView.java
index b6b6855efe..b007fecdea 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerBaseView.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapMarkerBaseView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.common.drawer.marker;
+package com.mogo.eagle.core.function.impl.marker;
import android.content.Context;
import android.graphics.Bitmap;
@@ -11,6 +11,7 @@ import android.widget.LinearLayout;
import androidx.annotation.Nullable;
+import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
import com.mogo.eagle.core.utilcode.mogo.glide.GlideImageLoader;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.eagle.core.utilcode.util.ViewUtils;
@@ -18,7 +19,6 @@ import com.mogo.eagle.core.utilcode.util.WindowUtils;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.module.common.R;
-import com.mogo.module.common.entity.MarkerShowEntity;
import com.mogo.eagle.core.utilcode.mogo.imageloader.IMogoImageLoaderListener;
import com.mogo.eagle.core.utilcode.mogo.imageloader.MogoImageView;
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerInfoView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapMarkerInfoView.java
similarity index 94%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerInfoView.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapMarkerInfoView.java
index 508ff1e2ad..987d18edef 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerInfoView.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapMarkerInfoView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.common.drawer.marker;
+package com.mogo.eagle.core.function.impl.marker;
import android.content.Context;
import android.text.TextUtils;
@@ -11,13 +11,13 @@ import android.widget.TextView;
import androidx.annotation.Nullable;
+import com.mogo.commons.module.status.MogoStatusManager;
+import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
+import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.module.common.ModuleNames;
-import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.R;
-import com.mogo.module.common.entity.MarkerExploreWay;
-import com.mogo.module.common.entity.MarkerShowEntity;
import com.mogo.module.common.marker.PoiWrapper;
import com.mogo.module.common.utils.CloudPoiManager;
@@ -74,7 +74,7 @@ public class MapMarkerInfoView extends MapMarkerBaseView {
Object bindObj = markerShowEntity.getBindObj();
- if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
+ if (MogoStatusManager.getInstance().isVrMode()) {
ivCar.setImageResource(R.drawable.icon_map_marker_location_yellow_vr);
} else {
ivCar.setImageResource(R.drawable.icon_map_marker_location_yellow);
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapMarkerView.java
similarity index 90%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerView.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapMarkerView.java
index 059c89d3ee..68f8f369d9 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/MapMarkerView.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MapMarkerView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.common.drawer.marker;
+package com.mogo.eagle.core.function.impl.marker;
import android.content.Context;
import android.util.AttributeSet;
@@ -7,13 +7,13 @@ import android.widget.FrameLayout;
import androidx.annotation.Nullable;
+import com.mogo.commons.module.status.MogoStatusManager;
+import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
+import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
+import com.mogo.eagle.core.function.map.R;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.module.common.ModuleNames;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.module.common.R;
-import com.mogo.module.common.entity.MarkerExploreWay;
-import com.mogo.module.common.entity.MarkerShowEntity;
import com.mogo.module.common.marker.PoiWrapper;
import com.mogo.module.common.utils.CloudPoiManager;
@@ -55,7 +55,7 @@ public class MapMarkerView extends MapMarkerBaseView {
@Override
protected void initView( Context context ) {
- if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
+ if ( MogoStatusManager.getInstance().isVrMode() ) {
LayoutInflater.from( context ).inflate( R.layout.modudle_services_marker_vr_layout, this );
} else {
LayoutInflater.from( context ).inflate( R.layout.modudle_services_marker_layout, this );
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/MarkerDrawer.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MarkerDrawer.java
similarity index 83%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/MarkerDrawer.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MarkerDrawer.java
index 2ee64f7e3a..871e5bd47e 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/MarkerDrawer.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/MarkerDrawer.java
@@ -1,25 +1,21 @@
-package com.mogo.module.common.drawer;
+package com.mogo.eagle.core.function.impl.marker;
import android.text.TextUtils;
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.commons.AbsMogoApplication;
+import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.data.map.MogoLatLng;
+import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
+import com.mogo.eagle.core.data.map.entity.MarkerNoveltyInfo;
+import com.mogo.eagle.core.data.map.entity.MarkerOnlineCar;
+import com.mogo.eagle.core.data.map.entity.MarkerShareMusic;
+import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
import com.mogo.map.MogoMarkerManager;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.marker.MogoMarkerOptions;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.module.common.drawer.marker.EmptyMarkerView;
-import com.mogo.module.common.drawer.marker.IMarkerView;
-import com.mogo.module.common.drawer.marker.MapMarkerAdapter;
-import com.mogo.module.common.drawer.marker.OnlineCarMarkerView;
-import com.mogo.module.common.entity.MarkerExploreWay;
-import com.mogo.module.common.entity.MarkerNoveltyInfo;
-import com.mogo.module.common.entity.MarkerOnlineCar;
-import com.mogo.module.common.entity.MarkerShareMusic;
-import com.mogo.module.common.entity.MarkerShowEntity;
-import com.mogo.module.common.enums.EventTypeEnum;
+import com.mogo.eagle.core.data.enums.EventTypeEnum;
/**
* @author congtaowang
@@ -75,9 +71,9 @@ public class MarkerDrawer {
if (markerShowEntity == null || markerShowEntity.getMarkerLocation() == null) {
return null;
}
- MogoMarkerOptions options = new MogoMarkerOptions().icon3DRes(icon3DRes).set3DMode(MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()).matchOnRoadSide(matchRoadSide).owner(markerShowEntity.getMarkerType()).zIndex(zIndex).data(markerShowEntity).latitude(markerShowEntity.getMarkerLocation().getLat()).longitude(markerShowEntity.getMarkerLocation().getLon());
+ MogoMarkerOptions options = new MogoMarkerOptions().icon3DRes(icon3DRes).set3DMode(MogoStatusManager.getInstance().isVrMode()).matchOnRoadSide(matchRoadSide).owner(markerShowEntity.getMarkerType()).zIndex(zIndex).data(markerShowEntity).latitude(markerShowEntity.getMarkerLocation().getLat()).longitude(markerShowEntity.getMarkerLocation().getLon());
- if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
+ if (MogoStatusManager.getInstance().isVrMode()) {
Object bindObj = markerShowEntity.getBindObj();
if (bindObj instanceof MarkerExploreWay && ((MarkerExploreWay) bindObj).getPoiType() != null) {
String poiType = ((MarkerExploreWay) bindObj).getPoiType();
@@ -107,7 +103,6 @@ public class MarkerDrawer {
marker.setOwner(markerShowEntity.getMarkerType());
markerView.setMarker(marker);
marker.setOnMarkerClickListener(listener);
- markerShowEntity.setMarker(marker);
}
return marker;
}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/OnlineCarMarkerView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/OnlineCarMarkerView.java
similarity index 95%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/OnlineCarMarkerView.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/OnlineCarMarkerView.java
index 9054545a85..71e01d88cb 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/marker/OnlineCarMarkerView.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/OnlineCarMarkerView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.common.drawer.marker;
+package com.mogo.eagle.core.function.impl.marker;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -21,7 +21,6 @@ import java.util.Map;
public class OnlineCarMarkerView implements IMarkerView {
private static Map< Integer, SoftReference< Bitmap > > sRef = new HashMap<>();
- private static Map< Integer, SoftReference< Bitmap > > sTypedRef = new HashMap<>();
private OnlineCarMarkerView() {
// private constructor
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/TrafficMarkerDrawer.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/TrafficMarkerDrawer.kt
similarity index 98%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/TrafficMarkerDrawer.kt
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/TrafficMarkerDrawer.kt
index fa71559d3d..206f86b627 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/TrafficMarkerDrawer.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/TrafficMarkerDrawer.kt
@@ -1,4 +1,4 @@
-package com.mogo.module.common.drawer
+package com.mogo.eagle.core.function.impl.marker
import android.annotation.SuppressLint
import android.content.Context
@@ -7,6 +7,7 @@ import android.os.Message
import android.text.TextUtils
import com.mogo.commons.AbsMogoApplication
import com.mogo.eagle.core.data.config.FunctionBuildConfig
+import com.mogo.eagle.core.data.constants.DataTypes
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
import com.mogo.eagle.core.data.traffic.TrafficData
import com.mogo.eagle.core.data.traffic.threatLevelColor
@@ -15,7 +16,6 @@ import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler
import com.mogo.map.MogoMarkerManager
import com.mogo.map.marker.IMogoMarker
import com.mogo.map.marker.MogoMarkerOptions
-import com.mogo.module.common.constants.DataTypes
import java.util.concurrent.ConcurrentHashMap
/**
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/V2XWarnDataDrawer.java
similarity index 86%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java
rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/V2XWarnDataDrawer.java
index d8717ef1ca..e890aa878e 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/V2XWarnDataDrawer.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/impl/marker/V2XWarnDataDrawer.java
@@ -1,17 +1,15 @@
-package com.mogo.module.common.drawer;
+package com.mogo.eagle.core.function.impl.marker;
-import static com.mogo.module.common.constants.DataTypes.TYPE_MARKER_CLOUD_STOP_LINE_DATA;
-import static com.mogo.module.common.constants.DataTypes.TYPE_MARKER_CLOUD_WARN_DATA;
+import static com.mogo.eagle.core.data.constants.DataTypes.TYPE_MARKER_CLOUD_STOP_LINE_DATA;
+import static com.mogo.eagle.core.data.constants.DataTypes.TYPE_MARKER_CLOUD_WARN_DATA;
import com.mogo.eagle.core.data.map.MogoLatLng;
+import com.mogo.eagle.core.data.map.entity.MarkerLocation;
+import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.map.MogoMarkerManager;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.MogoMarkerOptions;
-import com.mogo.module.common.drawer.marker.IMarkerView;
-import com.mogo.module.common.drawer.marker.MapMarkerAdapter;
-import com.mogo.module.common.entity.MarkerLocation;
-import com.mogo.module.common.entity.MarkerShowEntity;
/**
@@ -19,8 +17,8 @@ import com.mogo.module.common.entity.MarkerShowEntity;
*/
public class V2XWarnDataDrawer extends BaseDrawer {
- private static final String TAG = "V2XWarnDataDrawer";
private static volatile V2XWarnDataDrawer sInstance;
+ private static final byte[] obj = new byte[0];
private V2XWarnDataDrawer() {
super();
@@ -28,7 +26,7 @@ public class V2XWarnDataDrawer extends BaseDrawer {
public static V2XWarnDataDrawer getInstance() {
if (sInstance == null) {
- synchronized (V2XWarnDataDrawer.class) {
+ synchronized (obj) {
if (sInstance == null) {
sInstance = new V2XWarnDataDrawer();
}
@@ -54,9 +52,7 @@ public class V2XWarnDataDrawer extends BaseDrawer {
markerShowEntity.setMarkerType(TYPE_MARKER_CLOUD_WARN_DATA);
IMogoMarker marker = drawMarker(markerShowEntity, modeResType(type));
// marker.addDynamicAnchorPosition(new MogoLatLng(collisionlat, collisionLon), (float) heading, showTime * 1000);
- UiThreadHandler.postDelayed(() -> {
- marker.remove();
- }, showTime * 1000);
+ UiThreadHandler.postDelayed(marker::remove, showTime * 1000);
}
@@ -83,7 +79,7 @@ public class V2XWarnDataDrawer extends BaseDrawer {
.rotate((float) markerShowEntity.getMarkerLocation().getAngle())
.setGps(true);
IMarkerView iMarkerView = MapMarkerAdapter.getMarkerView(mContext, markerShowEntity, options);
- options.icon3DRes(getModelRes(modeResType)); //TODO
+ options.icon3DRes(getModelRes(modeResType));
options.anchorColor("#FB3C3CFF");
IMogoMarker marker = MogoMarkerManager.getInstance(mContext).addMarker(markerShowEntity.getMarkerType(), options);
iMarkerView.setMarker(marker);
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java
index 915f430be1..88d4d61e86 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java
@@ -15,6 +15,9 @@ import com.mogo.eagle.core.data.map.CenterLine;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider;
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener;
+import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber;
+import com.mogo.eagle.core.function.business.MapPointCloudSubscriber;
+import com.mogo.eagle.core.function.business.routeoverlay.MogoRouteOverlayManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
import com.mogo.eagle.core.function.call.map.CallerHDMapManager;
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager;
@@ -186,6 +189,7 @@ public class MapFragment extends MvpFragment
// TODO 临时初始化地图监听工控机、OBU等数据监听器,用于感知元素绘制
MapIdentifySubscriber.Companion.getInstance();
+ MogoRouteOverlayManager.getInstance().init();
MapPointCloudSubscriber.Companion.getInstance();
}
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/marker/MogoMarkerServiceImpl.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/marker/MogoMarkerServiceImpl.java
deleted file mode 100644
index 313b5e0e39..0000000000
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/marker/MogoMarkerServiceImpl.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.mogo.eagle.core.function.marker;
-
-import androidx.annotation.Nullable;
-
-import com.mogo.eagle.core.function.api.map.marker.IMogoMarkerService;
-import com.mogo.map.marker.IMogoMarker;
-import com.mogo.module.common.drawer.MarkerDrawer;
-import com.mogo.module.common.entity.MarkerShowEntity;
-import com.mogo.module.service.marker.MapMarkerManager;
-
-
-public class MogoMarkerServiceImpl implements IMogoMarkerService {
-
- private static volatile MogoMarkerServiceImpl sInstance;
- private static final byte[] obj = new byte[0];
-
- private MogoMarkerServiceImpl() {
-
- }
-
- public static MogoMarkerServiceImpl getInstance() {
- if (sInstance == null) {
- synchronized (obj) {
- if (sInstance == null) {
- sInstance = new MogoMarkerServiceImpl();
- }
- }
- }
- return sInstance;
- }
-
- @Nullable
- @Override
- public IMogoMarker drawMarker(Object object) {
- if (object instanceof MarkerShowEntity) {
- return MapMarkerManager.getInstance().drawMapMarker(((MarkerShowEntity) object), MarkerDrawer.MARKER_Z_INDEX_HIGH);
- }
- return null;
- }
-
-}
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java
index 17227329ec..9fda4089e0 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java
@@ -56,7 +56,6 @@ public class SmallMapFragment extends BaseFragment
@Override
protected void initViews() {
- SmpServiceManager.init(getContext());
}
@Override
@@ -85,24 +84,14 @@ public class SmallMapFragment extends BaseFragment
public void drawablePolyline(List coordinates) {
if (mSmallMapDirectionView != null) {
mSmallMapDirectionView.convert(coordinates);
- UiThreadHandler.post(new Runnable() {
- @Override
- public void run() {
- mSmallMapDirectionView.drawablePolyline();
- }
- });
+ UiThreadHandler.post(() -> mSmallMapDirectionView.drawablePolyline());
}
}
@Override
public void clearPolyline() {
if (mSmallMapDirectionView != null) {
- UiThreadHandler.post(new Runnable() {
- @Override
- public void run() {
- mSmallMapDirectionView.clearPolyline();
- }
- });
+ UiThreadHandler.post(() -> mSmallMapDirectionView.clearPolyline());
}
}
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmpServiceManager.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmpServiceManager.java
deleted file mode 100644
index bd36e3dec1..0000000000
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmpServiceManager.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.mogo.eagle.core.function.smp;
-
-import android.content.Context;
-
-import com.alibaba.android.arouter.launcher.ARouter;
-import com.mogo.service.IMogoServiceApis;
-import com.mogo.eagle.core.data.constants.MogoServicePaths;
-import com.mogo.service.module.IMogoRegisterCenter;
-
-/**
- * author : donghongyu
- * e-mail : 1358506549@qq.com
- * date : 2020-01-2114:01
- * desc : V2X 服务
- * version: 1.0
- */
-public class SmpServiceManager {
- private static final String TAG = "V2XServiceManager";
- private static boolean isInit;
- private static Context mContext;
- private static IMogoServiceApis mMogoServiceApis;
- private static IMogoRegisterCenter mMogoRegisterCenter;
-
- private SmpServiceManager() {
-
- }
-
- public static void init(final Context context) {
- if (!isInit) {
- isInit = true;
- mContext = context;
- mMogoServiceApis = (IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(context);
- mMogoRegisterCenter = mMogoServiceApis.getRegisterCenterApi();
- }
- }
-
- public static Context getContext() {
- return mContext;
- }
-
- public static IMogoRegisterCenter getMogoRegisterCenter() {
- return mMogoRegisterCenter;
- }
-
-}
diff --git a/core/function-impl/mogo-core-function-monitoring/src/main/java/com/mogo/eagle/core/function/monitoring/CronTaskManager.kt b/core/function-impl/mogo-core-function-monitoring/src/main/java/com/mogo/eagle/core/function/monitoring/CronTaskManager.kt
index a250a266c1..6608dd9c18 100644
--- a/core/function-impl/mogo-core-function-monitoring/src/main/java/com/mogo/eagle/core/function/monitoring/CronTaskManager.kt
+++ b/core/function-impl/mogo-core-function-monitoring/src/main/java/com/mogo/eagle/core/function/monitoring/CronTaskManager.kt
@@ -12,7 +12,7 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MONITOR
import com.mogo.map.MogoLocationClient
-import com.mogo.module.common.constants.HostConst
+import com.mogo.eagle.core.data.constants.HostConst
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt
index 9413369c04..029de4696f 100644
--- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt
+++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt
@@ -19,9 +19,8 @@ import com.mogo.eagle.core.function.obu.mogo.utils.TrafficDataConvertUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
-import com.mogo.module.common.drawer.TrafficMarkerDrawer
-import com.mogo.module.common.enums.EventTypeEnum
-import com.mogo.module.common.enums.EventTypeHelper
+import com.mogo.eagle.core.data.enums.EventTypeEnum
+import com.mogo.eagle.core.data.enums.EventTypeHelper
import com.mogo.service.IMogoServiceApis
import com.zhidao.support.obu.MogoObuManager
import com.zhidao.support.obu.OnMogoObuListener
@@ -77,16 +76,16 @@ class MogoPrivateObuManager private constructor() {
}
}
- fun disConnectObu(){
+ fun disConnectObu() {
try {
MogoObuManager.getInstance().disConnect()
} catch (e: Exception) {
e.printStackTrace()
}
-
+
}
- fun isConnected(): Boolean{
+ fun isConnected(): Boolean {
return MogoObuManager.getInstance().isConnected
}
@@ -219,7 +218,7 @@ class MogoPrivateObuManager private constructor() {
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU_RV", true) }
// 更新数据
TrafficDataConvertUtils.cvxRvInfoIndInfo2TrafficData(info)?.let {
- TrafficMarkerDrawer.updateITrafficLocationInfo(it)
+ CallerMapUIServiceManager.getMarkerService()?.updateITrafficLocationInfo(it)
}
}
@@ -389,7 +388,8 @@ class MogoPrivateObuManager private constructor() {
// 更新数据
TrafficDataConvertUtils.cvxRtiThreatIndInfo2TrafficData(info)?.let {
CallerObuListenerManager.invokeTrackerWarningInfo(it)
- TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
+ CallerMapUIServiceManager.getMarkerService()
+ ?.updateITrafficThreatLevelInfo(it)
}
}
// 删除
@@ -403,7 +403,8 @@ class MogoPrivateObuManager private constructor() {
CallerObuListenerManager.removeTrackerWarningInfo(it)
// 事件结束,还原车辆颜色
it.threatLevel = 0x01
- TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
+ CallerMapUIServiceManager.getMarkerService()
+ ?.updateITrafficThreatLevelInfo(it)
}
}
}
@@ -507,7 +508,8 @@ class MogoPrivateObuManager private constructor() {
// 更新数据
TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(info)?.let {
CallerObuListenerManager.invokeTrackerWarningInfo(it)
- TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
+ CallerMapUIServiceManager.getMarkerService()
+ ?.updateITrafficThreatLevelInfo(it)
}
}
// 删除
@@ -519,7 +521,8 @@ class MogoPrivateObuManager private constructor() {
CallerObuListenerManager.removeTrackerWarningInfo(it)
// 事件结束,还原交通参与者颜色
it.threatLevel = 0x01
- TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
+ CallerMapUIServiceManager.getMarkerService()
+ ?.updateITrafficThreatLevelInfo(it)
}
CallerHmiManager.disableWarningV2X(ObuConstants.USE_CASE_ID.VRUCW.toString())
}
@@ -849,21 +852,21 @@ class MogoPrivateObuManager private constructor() {
}
//前车急刹预警
EventTypeEnum.TYPE_USECASE_ID_EBW.poiType -> {
- EventTypeHelper.getEBW(appId){ alert, tts ->
+ EventTypeHelper.getEBW(appId) { alert, tts ->
alertContent = alert
ttsContent = tts
}
}
//前向碰撞预警
EventTypeEnum.TYPE_USECASE_ID_FCW.poiType -> {
- EventTypeHelper.getFCW(appId){ alert, tts ->
+ EventTypeHelper.getFCW(appId) { alert, tts ->
alertContent = alert
ttsContent = tts
}
}
//逆向超车预警
EventTypeEnum.TYPE_USECASE_ID_DNPW.poiType -> {
- EventTypeHelper.getDNPW(appId){ alert, tts ->
+ EventTypeHelper.getDNPW(appId) { alert, tts ->
alertContent = alert
ttsContent = tts
}
@@ -917,7 +920,7 @@ class MogoPrivateObuManager private constructor() {
//更新周边车辆进行预警颜色变换,车辆实时移动和变色
TrafficDataConvertUtils.cvxV2vThreatIndInfo2TrafficData(info)?.let {
CallerObuListenerManager.invokeTrackerWarningInfo(it)
- TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
+ CallerMapUIServiceManager.getMarkerService()?.updateITrafficThreatLevelInfo(it)
}
}
// 删除
@@ -930,7 +933,7 @@ class MogoPrivateObuManager private constructor() {
TrafficDataConvertUtils.cvxV2vThreatIndInfo2TrafficData(info)?.let {
CallerObuListenerManager.removeTrackerWarningInfo(it)
it.threatLevel = 0x01
- TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
+ CallerMapUIServiceManager.getMarkerService()?.updateITrafficThreatLevelInfo(it)
}
}
}
diff --git a/core/function-impl/mogo-core-function-v2x/build.gradle b/core/function-impl/mogo-core-function-v2x/build.gradle
index 16bcc91360..d3e3235a93 100644
--- a/core/function-impl/mogo-core-function-v2x/build.gradle
+++ b/core/function-impl/mogo-core-function-v2x/build.gradle
@@ -53,6 +53,7 @@ dependencies {
implementation rootProject.ext.dependencies.mogo_v2x
implementation rootProject.ext.dependencies.mogoaicloudtrafficlive
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
+ implementation rootProject.ext.dependencies.mogocommons
implementation rootProject.ext.dependencies.modulecommon
implementation rootProject.ext.dependencies.moduleservice
implementation rootProject.ext.dependencies.mogo_core_data
@@ -62,6 +63,7 @@ dependencies {
//implementation rootProject.ext.dependencies.callchatprovider
implementation rootProject.ext.dependencies.mogo_core_res
} else {
+ implementation project(":foudations:mogo-commons")
implementation project(':modules:mogo-module-common')
implementation project(':modules:mogo-module-service')
implementation project(':core:mogo-core-data')
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 a1b4af8528..91388eab96 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
@@ -8,14 +8,21 @@ import androidx.core.util.Pair
import androidx.localbroadcastmanager.content.*
import com.mogo.cloud.commons.utils.*
import com.mogo.cloud.passport.*
-import com.mogo.module.common.enums.EventTypeEnum
-import com.mogo.module.common.enums.EventTypeHelper
+import com.mogo.commons.module.status.IMogoStatusChangedListener
+import com.mogo.commons.module.status.MogoStatusManager
+import com.mogo.commons.module.status.StatusDescriptor
+import com.mogo.eagle.core.data.enums.EventTypeEnum
+import com.mogo.eagle.core.data.enums.EventTypeHelper
import com.mogo.commons.network.*
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_V2N
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_CLOUD_SHOW
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CLOUD_V2N
import com.mogo.eagle.core.data.enums.*
import com.mogo.eagle.core.data.map.*
+import com.mogo.eagle.core.data.map.entity.MarkerExploreWay
+import com.mogo.eagle.core.data.map.entity.MarkerShowEntity
+import com.mogo.eagle.core.data.map.entity.V2XMessageEntity
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.data.traffic.*
import com.mogo.eagle.core.function.api.hmi.warning.*
import com.mogo.eagle.core.function.api.map.listener.*
@@ -49,12 +56,6 @@ import com.mogo.eagle.core.utilcode.util.Utils
import com.mogo.map.listener.*
import com.mogo.map.marker.*
import com.mogo.module.common.*
-import com.mogo.module.common.drawer.*
-import com.mogo.module.common.entity.*
-import com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum
-import com.mogo.service.statusmanager.*
-import com.mogo.service.statusmanager.StatusDescriptor.ACC_STATUS
-import com.mogo.service.statusmanager.StatusDescriptor.SEEK_HELPING
import com.mogo.v2x.*
import com.mogo.v2x.callback.*
import com.mogo.v2x.config.*
@@ -135,10 +136,9 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
}
})
}
- BridgeApi.statusManager()?.let {
- it.registerStatusChangedListener(MODULE_NAME, ACC_STATUS, this)
- it.registerStatusChangedListener(MODULE_NAME, SEEK_HELPING, this)
- }
+ MogoStatusManager.getInstance().registerStatusChangedListener(MODULE_NAME, StatusDescriptor.ACC_STATUS, this)
+ MogoStatusManager.getInstance().registerStatusChangedListener(MODULE_NAME, StatusDescriptor.SEEK_HELPING, this)
+
}
private fun unRegisterListener() {
@@ -148,10 +148,9 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
it.unregisterMogoMapListener(MODULE_NAME)
it.unregisterMogoMarkerClickListener(ModuleNames.CARD_TYPE_ROAD_CONDITION)
}
- BridgeApi.statusManager()?.let {
- it.unregisterStatusChangedListener(MODULE_NAME, ACC_STATUS, this)
- it.unregisterStatusChangedListener(MODULE_NAME, SEEK_HELPING, this)
- }
+ MogoStatusManager.getInstance().unregisterStatusChangedListener(MODULE_NAME, StatusDescriptor.ACC_STATUS, this)
+ MogoStatusManager.getInstance().unregisterStatusChangedListener(MODULE_NAME, StatusDescriptor.SEEK_HELPING, this)
+
}
private fun initData() {
@@ -201,7 +200,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
val v2XMessageEntity: V2XMessageEntity =
V2XMessageEntity()
- v2XMessageEntity.type = V2XTypeEnum.ALERT_ROAD_WARNING
+ v2XMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING
v2XMessageEntity.isShowState = true
v2XMessageEntity.isOnlyShow = true
v2XMessageEntity.isNeedAddLine = false
@@ -242,20 +241,18 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
CallerLogger.d("$M_V2X$TAG", "状态发生改变\ndescriptor:$descriptor\nisTrue:$isTrue") // 记录状态更改
// 记录状态更改
SharedPrefsMgr.getInstance(Utils.getApp()).putBoolean("descriptor_$descriptor", isTrue)
- if (descriptor == ACC_STATUS) {
+ if (descriptor == StatusDescriptor.ACC_STATUS) {
if (isTrue) { // 刷新配置文件
refreshStrategyConfig()
// 记录开机时间
FatigueDrivingUtils.refreshAccOnTime()
initCarForHelpStatus()
- BridgeApi.statusManager()?.let {
- V2XManager.forceRefresh()
- }
+ V2XManager.forceRefresh()
} else { // 记录关机时间
SharedPrefsMgr.getInstance(Utils.getApp())
.putString(V2X_ACC_OFF_TIME_STR, TimeUtils.getNowString())
}
- } else if (descriptor == SEEK_HELPING) {
+ } else if (descriptor == StatusDescriptor.SEEK_HELPING) {
refreshMeSeekHelp(isTrue)
}
}
@@ -267,7 +264,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
*/
private fun refreshMeSeekHelp(isTrue: Boolean) {
val entity = V2XMessageEntity()
- entity.type = V2XTypeEnum.ALERT_CAR_FOR_HELP
+ entity.type = V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP
entity.content = isTrue
V2XScenarioManager.getInstance().handlerMessage(entity)
}
@@ -286,10 +283,10 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
val vehicleType: Int = resultBean.vehicleType //故障车
if (vehicleType == 4) {
refreshMeSeekHelp(true)
- BridgeApi.statusManager()?.setSeekHelping(MODULE_NAME, true)
+ MogoStatusManager.getInstance().setSeekHelping(MODULE_NAME, true)
} else {
refreshMeSeekHelp(false)
- BridgeApi.statusManager()?.setSeekHelping(MODULE_NAME, false)
+ MogoStatusManager.getInstance().setSeekHelping(MODULE_NAME, false)
}
}
}
@@ -360,7 +357,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
Logger.d(TAG, "--- trigger show ---:poiType:" + v2XRoadEventEntity.poiType)
TrackUtils.trackV2xRoadProduceEvent(1)
val v2XMessageEntity = V2XMessageEntity()
- v2XMessageEntity.type = V2XTypeEnum.ALERT_ROAD_WARNING
+ v2XMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING
v2XMessageEntity.content = v2XRoadEventEntity
v2XMessageEntity.isShowState = true
V2XScenarioManager.getInstance().handlerMessage(v2XMessageEntity)
@@ -470,7 +467,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
private fun handleWarningTargetEvent(data: V2XWarningTarget) {
val v2xMessageEntity = V2XMessageEntity()
- v2xMessageEntity.type = V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS
+ v2xMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS
// 设置数据
v2xMessageEntity.content = data
val intent = Intent(BROADCAST_SCENE_HANDLER_ACTION)
@@ -491,7 +488,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
private fun handleOptimalRouteEvent(event: V2XEvent.OptimalRoute) {
val v2xMessageEntity: V2XMessageEntity =
V2XMessageEntity() // 控制类型
- v2xMessageEntity.type = V2XTypeEnum.ALERT_PUSH_VR_SHOW // 设置数据
+ v2xMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_VR_SHOW // 设置数据
v2xMessageEntity.content = event.data // 控制展示状态
v2xMessageEntity.isShowState = true
val intent = Intent(BROADCAST_SCENE_HANDLER_ACTION)
@@ -595,14 +592,14 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
true,
5000L
)
- TrafficMarkerDrawer.updateITrafficInfo(trafficData)
+ CallerMapUIServiceManager.getMarkerService()?.updateITrafficInfo(trafficData)
}
2 -> {
- TrafficMarkerDrawer.updateITrafficInfo(trafficData)
+ CallerMapUIServiceManager.getMarkerService()?.updateITrafficInfo(trafficData)
}
3 -> {
trafficData.uuid?.let {
- TrafficMarkerDrawer.removeCvxRvInfoIndInfo(it)
+ CallerMapUIServiceManager.getMarkerService()?.removeCvxRvInfoIndInfo(it)
}
}
}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/alarm/V2XAlarmServer.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/alarm/V2XAlarmServer.java
index 29626c7b07..1d822f9a92 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/alarm/V2XAlarmServer.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/alarm/V2XAlarmServer.java
@@ -1,10 +1,10 @@
package com.mogo.eagle.core.function.v2x.events.alarm;
import com.mogo.eagle.core.data.map.MogoLocation;
+import com.mogo.eagle.core.data.map.entity.MarkerLocation;
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.v2x.events.utils.DrivingDirectionUtils;
-import com.mogo.module.common.entity.MarkerLocation;
-import com.mogo.module.common.entity.V2XRoadEventEntity;
-import com.mogo.module.common.enums.EventTypeEnum;
+import com.mogo.eagle.core.data.enums.EventTypeEnum;
import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArrayList;
import io.netty.util.internal.ConcurrentSet;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt
index f439d2bee5..2faa6952be 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt
@@ -8,7 +8,6 @@ import com.mogo.eagle.core.function.v2x.events.manager.*
import com.mogo.eagle.core.function.v2x.events.network.V2XRefreshModel
import com.mogo.eagle.core.utilcode.util.Utils
import com.mogo.module.common.MogoApisHandler
-import com.mogo.service.statusmanager.IMogoStatusManager
import java.lang.ref.WeakReference
import java.util.concurrent.atomic.AtomicReference
@@ -60,8 +59,6 @@ internal object BridgeApi {
fun context(): Context = this.context.get()?.get() ?: Utils.getApp()
- fun statusManager(): IMogoStatusManager? = apis?.statusManagerApi
-
fun v2xMarker() = v2xMarker
fun v2xPolyline() = v2xPolyline
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/net/V2XAlarmEventRes.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/net/V2XAlarmEventRes.java
index 1700c72906..1d242de50b 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/net/V2XAlarmEventRes.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/net/V2XAlarmEventRes.java
@@ -6,8 +6,8 @@ import android.text.TextUtils;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.mogo.eagle.core.data.BaseData;
-import com.mogo.module.common.entity.MarkerLocation;
-import com.mogo.module.common.entity.MarkerOnlineCar;
+import com.mogo.eagle.core.data.map.entity.MarkerLocation;
+import com.mogo.eagle.core.data.map.entity.MarkerOnlineCar;
import java.io.Serializable;
import java.util.ArrayList;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/net/V2XLiveCarRes.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/net/V2XLiveCarRes.java
index 91e4269a06..37c0e060cc 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/net/V2XLiveCarRes.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/net/V2XLiveCarRes.java
@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.v2x.events.entity.net;
import com.google.gson.annotations.Expose;
import com.mogo.eagle.core.data.BaseData;
-import com.mogo.module.common.entity.V2XLiveCarInfoEntity;
+import com.mogo.eagle.core.data.map.entity.V2XLiveCarInfoEntity;
import java.io.Serializable;
import java.util.List;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/panel/SurroundingConstruction.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/panel/SurroundingConstruction.java
index 5327410adb..00af59ade0 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/panel/SurroundingConstruction.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/panel/SurroundingConstruction.java
@@ -1,7 +1,7 @@
package com.mogo.eagle.core.function.v2x.events.entity.panel;
-import com.mogo.module.common.entity.MarkerExploreWay;
-import com.mogo.module.common.enums.EventTypeEnum;
+import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
+import com.mogo.eagle.core.data.enums.EventTypeEnum;
import java.io.Serializable;
import java.util.ArrayList;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/panel/SurroundingResponse.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/panel/SurroundingResponse.java
index a89c64fd5e..d2df876e59 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/panel/SurroundingResponse.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/entity/panel/SurroundingResponse.java
@@ -1,7 +1,7 @@
package com.mogo.eagle.core.function.v2x.events.entity.panel;
import com.mogo.eagle.core.data.BaseData;
-import com.mogo.module.common.entity.MarkerExploreWay;
+import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
import java.util.List;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XMarkerManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XMarkerManager.java
index d7f8338c31..739c8cdf99 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XMarkerManager.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XMarkerManager.java
@@ -3,8 +3,8 @@ package com.mogo.eagle.core.function.v2x.events.manager;
import android.content.Context;
import com.alibaba.android.arouter.facade.template.IProvider;
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.map.marker.IMogoMarkerClickListener;
-import com.mogo.module.common.entity.V2XRoadEventEntity;
import com.mogo.v2x.data.V2XMarkerCardResult;
import java.util.concurrent.CopyOnWriteArrayList;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XPolylineManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XPolylineManager.java
index 5d79c45760..00ccb22e7a 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XPolylineManager.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/IMoGoV2XPolylineManager.java
@@ -3,8 +3,8 @@ package com.mogo.eagle.core.function.v2x.events.manager;
import android.content.Context;
import com.alibaba.android.arouter.facade.template.IProvider;
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.map.overlay.IMogoPolyline;
-import com.mogo.module.common.entity.V2XRoadEventEntity;
/**
* author : donghongyu
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/V2XStatusManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/V2XStatusManager.java
index 5faeb0b104..541a2090a7 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/V2XStatusManager.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/V2XStatusManager.java
@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.v2x.events.manager;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
-import com.mogo.module.common.entity.V2XRoadEventEntity;
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
/**
* author : donghongyu
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XMarkerManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XMarkerManager.java
index 5540705d79..02af44519b 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XMarkerManager.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XMarkerManager.java
@@ -6,9 +6,15 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X
import android.content.Context;
import com.alibaba.android.arouter.facade.annotation.Route;
+import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.commons.AbsMogoApplication;
+import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
+import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
+import com.mogo.eagle.core.data.map.entity.MarkerLocation;
+import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
@@ -25,14 +31,7 @@ import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.marker.IMogoMarkerManager;
import com.mogo.map.marker.MogoMarkerOptions;
-import com.mogo.module.common.entity.MarkerExploreWay;
-import com.mogo.module.common.entity.MarkerLocation;
-import com.mogo.module.common.entity.MarkerShowEntity;
-import com.mogo.module.common.entity.V2XRoadEventEntity;
-import com.mogo.module.common.enums.EventTypeEnum;
-import com.mogo.module.service.ServiceConst;
-import com.mogo.module.service.Utils;
-import com.mogo.service.statusmanager.IMogoStatusManager;
+import com.mogo.eagle.core.data.enums.EventTypeEnum;
import com.mogo.v2x.V2XManager;
import com.mogo.v2x.data.V2XMarkerCardResult;
import com.mogo.v2x.data.V2XMarkerExploreWay;
@@ -58,6 +57,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
private static final CopyOnWriteArraySet mV2XRoadEventEntityArrayList = new CopyOnWriteArraySet<>();
// 上次的道路事件的预警Marker
private static IMogoMarker mAlarmInfoMarker;
+ public static final String CARD_TYPE_NOVELTY = "CARD_TYPE_NOVELTY";
@Override
public void drawableLastAllPOI() {
@@ -81,10 +81,8 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
// 事件位置
MarkerLocation location = v2XRoadEventEntity.getLocation();
if (location != null) {
- float calculateDistance = Utils.calculateLineDistance(
- new MogoLatLng(location.getLat(), location.getLon()),
- new MogoLatLng(currentLocation.getLatitude(), currentLocation.getLongitude())
- );
+ float calculateDistance = CoordinateUtils.calculateLineDistance(location.getLat(), location.getLon(),
+ currentLocation.getLatitude(), currentLocation.getLongitude());
v2XRoadEventEntity.setDistance(calculateDistance);
}
roadEventEntities.add(v2XRoadEventEntity);
@@ -157,16 +155,12 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
markerShowEntity.setChecked(false);
markerShowEntity.setTextContent(markerExploreWay.getAddr());
markerShowEntity.setMarkerLocation(markerExploreWay.getLocation());
- markerShowEntity.setMarkerType(ServiceConst.CARD_TYPE_NOVELTY);
+ markerShowEntity.setMarkerType(CARD_TYPE_NOVELTY);
optionsRipple.icons(V2XMarkerAdapter.getV2XRoadEventViewGif(context, roadEventEntity));
optionsRipple.period(1);
- boolean isVrMode = false;
- IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
- if (statusManager != null) {
- isVrMode = statusManager.isVrMode();
- }
- if (isVrMode) {
+
+ if (MogoStatusManager.getInstance().isVrMode()) {
mAlarmInfoMarker = Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerService()).drawMarker(markerShowEntity);
} else {
optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity));
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XPolylineManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XPolylineManager.java
index d5785ed71b..91318099b4 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XPolylineManager.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XPolylineManager.java
@@ -3,11 +3,11 @@ package com.mogo.eagle.core.function.v2x.events.manager.impl;
import android.content.Context;
import com.alibaba.android.arouter.facade.annotation.Route;
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XPolylineManager;
import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager;
import com.mogo.map.overlay.IMogoPolyline;
-import com.mogo.module.common.entity.V2XRoadEventEntity;
/**
* author : donghongyu
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XStatusManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XStatusManager.java
index e476192828..6a490ac288 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XStatusManager.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/manager/impl/MoGoV2XStatusManager.java
@@ -3,13 +3,12 @@ package com.mogo.eagle.core.function.v2x.events.manager.impl;
import android.content.Context;
import com.alibaba.android.arouter.facade.annotation.Route;
-import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
+import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusChangedListener;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager;
import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusDescriptor;
-import com.mogo.service.statusmanager.IMogoStatusManager;
import java.util.List;
import java.util.Map;
@@ -54,10 +53,7 @@ public class MoGoV2XStatusManager implements IMoGoV2XStatusManager {
@Override
public void setRoadEventPOIShow(String tag, boolean show) {
- IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
- if (statusManager != null) {
- statusManager.setV2XUIShow(V2XConst.MODULE_NAME, show);
- }
+ MogoStatusManager.getInstance().setV2XUIShow(V2XConst.MODULE_NAME, show);
mStatus.put(V2XStatusDescriptor.RoadEventPOI_UI, show);
invokeStatusChangedListener(V2XStatusDescriptor.RoadEventPOI_UI, show);
recordStatusModifier(tag, V2XStatusDescriptor.RoadEventPOI_UI);
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 6c9fccb975..215745c444 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
@@ -3,9 +3,9 @@ package com.mogo.eagle.core.function.v2x.events.marker;
import android.content.Context;
import android.graphics.Bitmap;
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.v2x.R;
-import com.mogo.module.common.entity.V2XRoadEventEntity;
-import com.mogo.module.common.enums.EventTypeEnum;
+import com.mogo.eagle.core.data.enums.EventTypeEnum;
import java.util.ArrayList;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/V2XMarkerRoadEventView.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/V2XMarkerRoadEventView.kt
index 02cbd0cee3..2fe26980a0 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/V2XMarkerRoadEventView.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/marker/V2XMarkerRoadEventView.kt
@@ -5,10 +5,10 @@ import android.content.Context
import android.graphics.Bitmap
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.function.v2x.R
import com.mogo.eagle.core.utilcode.util.ViewUtils
-import com.mogo.module.common.entity.V2XRoadEventEntity
-import com.mogo.module.common.enums.EventTypeEnum
+import com.mogo.eagle.core.data.enums.EventTypeEnum
import kotlinx.android.synthetic.main.view_marker_event_car.view.*
/**
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/network/V2XApiServiceFactory.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/network/V2XApiServiceFactory.java
index 8f687d8f5c..b20266d1f5 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/network/V2XApiServiceFactory.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/network/V2XApiServiceFactory.java
@@ -1,7 +1,7 @@
package com.mogo.eagle.core.function.v2x.events.network;
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
-import com.mogo.module.common.constants.HostConst;
+import com.mogo.eagle.core.data.constants.HostConst;
/**
* 应对不同接口对应不同服务域名的工厂累
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/SceneBroadcastReceiver.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/SceneBroadcastReceiver.kt
index f093b60e02..a9790d35a9 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/SceneBroadcastReceiver.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/receiver/SceneBroadcastReceiver.kt
@@ -3,9 +3,9 @@ package com.mogo.eagle.core.function.v2x.events.receiver
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
+import com.mogo.eagle.core.data.map.entity.V2XMessageEntity
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst
import com.mogo.eagle.core.function.v2x.events.scenario.impl.V2XScenarioManager
-import com.mogo.module.common.entity.V2XMessageEntity
import java.lang.Exception
class SceneBroadcastReceiver: BroadcastReceiver() {
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 de171cf38c..acb38623e6 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
@@ -6,20 +6,19 @@ import android.content.Intent;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
+import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.data.map.MogoLatLng;
+import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
+import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.call.chat.CallerChatManager;
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
-import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes;
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSpecialCarRes;
import com.mogo.eagle.core.function.v2x.events.utils.TestOnLineCarUtils;
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.V2XRoadEventEntity;
-import com.mogo.service.statusmanager.IMogoStatusManager;
import java.util.List;
@@ -66,7 +65,8 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
// 存储本地,出行动态作展示
saveLocalStory(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING,
v2XMessageEntity.getContent().getNoveltyInfo());
- } if (sceneType == 2) {// 触发AI道路施工事件
+ }
+ if (sceneType == 2) {// 触发AI道路施工事件
V2XMessageEntity v2XMessageEntity =
TestOnLineCarUtils.getV2XScenarioAIRoadEventData();
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
@@ -129,10 +129,7 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
- IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
- if (statusManager != null) {
- statusManager.setSeekHelping(V2XConst.MODULE_NAME, true);
- }
+ MogoStatusManager.getInstance().setSeekHelping(V2XConst.MODULE_NAME, true);
} else if (sceneType == 20) {// 小地图绘制线
List coordinates = TestOnLineCarUtils.getTestCoordinates();
CallerSmpManager.drawablePolyline(coordinates);
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/IV2XScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/IV2XScenario.java
index d442e28196..40ef63740f 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/IV2XScenario.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/IV2XScenario.java
@@ -1,6 +1,6 @@
package com.mogo.eagle.core.function.v2x.events.scenario;
-import com.mogo.module.common.entity.V2XMessageEntity;
+import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
/**
* author : donghongyu
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/IV2XScenarioManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/IV2XScenarioManager.java
index 90be90fbb1..7e055dcca3 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/IV2XScenarioManager.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/IV2XScenarioManager.java
@@ -1,6 +1,7 @@
package com.mogo.eagle.core.function.v2x.events.scenario;
-import com.mogo.module.common.entity.V2XMessageEntity;
+
+import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
/**
* author : donghongyu
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/AbsV2XScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/AbsV2XScenario.java
index f13fae8a64..cd72feafbd 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/AbsV2XScenario.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/AbsV2XScenario.java
@@ -2,9 +2,10 @@ package com.mogo.eagle.core.function.v2x.events.scenario.impl;
import androidx.annotation.Nullable;
+
+import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.function.v2x.events.scenario.IV2XScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
-import com.mogo.module.common.entity.V2XMessageEntity;
/**
* author : donghongyu
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java
index f1b6a9b176..e8024eadf1 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java
@@ -6,22 +6,19 @@ import android.content.Intent;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
-import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.AiRoadMarker;
-import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
-import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
+import com.mogo.commons.module.status.MogoStatusManager;
+import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
import com.mogo.eagle.core.function.v2x.events.scenario.IV2XScenarioManager;
import com.mogo.eagle.core.function.v2x.events.scenario.scene.road.V2XRoadEventScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.scene.route.V2XOptimalRouteVREventScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.scene.warning.V2XFrontWarningScenario;
-import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
+import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
import com.mogo.eagle.core.utilcode.util.Utils;
import com.mogo.map.MogoMapUIController;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.map.uicontroller.VisualAngleMode;
-import com.mogo.module.common.entity.V2XMessageEntity;
-import com.mogo.service.statusmanager.IMogoStatusManager;
/**
* author : donghongyu
@@ -74,12 +71,7 @@ public class V2XScenarioManager implements IV2XScenarioManager {
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS:
sceneChange();
- boolean isVrMode1 = false;
- IMogoStatusManager statusManager1 = BridgeApi.INSTANCE.statusManager();
- if (statusManager1 != null) {
- isVrMode1 = statusManager1.isVrMode();
- }
- if (isVrMode1) {
+ if (MogoStatusManager.getInstance().isVrMode()) {
mV2XScenario = new V2XFrontWarningScenario();
} else {
mV2XScenario = null;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/airoad/AiRoadMarker.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/airoad/AiRoadMarker.kt
index 4eed099ce7..1fb0866cfd 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/airoad/AiRoadMarker.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/airoad/AiRoadMarker.kt
@@ -12,6 +12,7 @@ import androidx.lifecycle.Lifecycle.Event.ON_CREATE
import androidx.lifecycle.Lifecycle.Event.ON_DESTROY
import com.mogo.eagle.core.data.map.*
import com.mogo.eagle.core.data.map.MapRoadInfo.StopLine
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.function.api.map.listener.*
import com.mogo.eagle.core.function.api.v2x.*
import com.mogo.eagle.core.function.call.map.*
@@ -23,7 +24,6 @@ import com.mogo.eagle.core.utilcode.kotlin.*
import com.mogo.eagle.core.utilcode.mogo.logger.*
import com.mogo.map.*
import com.mogo.map.overlay.*
-import com.mogo.module.common.entity.*
import com.mogo.module.common.utils.*
import io.netty.util.internal.*
import java.lang.Runnable
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XAiRoadEventMarker.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XAiRoadEventMarker.kt
index 4689c0d8d7..fb42765d08 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XAiRoadEventMarker.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XAiRoadEventMarker.kt
@@ -4,13 +4,13 @@ import android.graphics.*
import android.util.*
import com.mogo.cloud.commons.utils.*
import com.mogo.eagle.core.data.map.*
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.context
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.v2xMarker
import com.mogo.map.*
import com.mogo.map.R.raw
import com.mogo.map.marker.*
import com.mogo.map.overlay.*
-import com.mogo.module.common.entity.*
import com.mogo.module.common.utils.*
import java.util.*
import java.util.concurrent.atomic.*
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventMarker.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventMarker.java
index e7a220dace..7b0637ba7e 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventMarker.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventMarker.java
@@ -2,15 +2,15 @@ package com.mogo.eagle.core.function.v2x.events.scenario.scene.road;
import androidx.core.util.Pair;
+import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
+import com.mogo.eagle.core.data.map.entity.MarkerLocation;
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XMarkerManager;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XPolylineManager;
import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.AiRoadMarker;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
-import com.mogo.module.common.entity.MarkerExploreWay;
-import com.mogo.module.common.entity.MarkerLocation;
-import com.mogo.module.common.entity.V2XRoadEventEntity;
-import com.mogo.module.common.enums.EventTypeEnum;
+import com.mogo.eagle.core.data.enums.EventTypeEnum;
import java.util.ArrayList;
import java.util.List;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java
index affddf3c20..8ccb7815ce 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java
@@ -4,6 +4,9 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X
import com.mogo.commons.analytics.AnalyticsUtils;
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
+import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
+import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
@@ -13,10 +16,7 @@ import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
-import com.mogo.module.common.entity.MarkerExploreWay;
-import com.mogo.module.common.entity.V2XMessageEntity;
-import com.mogo.module.common.entity.V2XRoadEventEntity;
-import com.mogo.module.common.enums.EventTypeEnum;
+import com.mogo.eagle.core.data.enums.EventTypeEnum;
import java.util.HashMap;
import java.util.Map;
@@ -68,7 +68,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp
boolean onlyShow = getV2XMessageEntity().isOnlyShow();
if (!onlyShow) {
// 设置TTS
- getV2XMessageEntity().getContent().getTts(false);
+ getV2XMessageEntity().getContent().getTts();
}
showWindow();
String poiType = getV2XMessageEntity().getContent().getPoiType();
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventScenario.java
index 642da8f42a..bc12e44e79 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventScenario.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/route/V2XOptimalRouteVREventScenario.java
@@ -4,6 +4,7 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X
import androidx.annotation.Nullable;
+import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
@@ -13,7 +14,6 @@ import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager;
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
import com.mogo.eagle.core.network.utils.GsonUtil;
-import com.mogo.module.common.entity.V2XMessageEntity;
import java.util.concurrent.TimeUnit;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XFrontWarningScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XFrontWarningScenario.java
index b1059d7077..e45788e227 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XFrontWarningScenario.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XFrontWarningScenario.java
@@ -9,13 +9,13 @@ import android.text.style.ForegroundColorSpan;
import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
import com.mogo.eagle.core.data.map.MogoLocation;
+import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
-import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.v2x.data.V2XWarningTarget;
import java.math.BigDecimal;
import java.util.Locale;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XWarningMarker.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XWarningMarker.java
index 6c75c97edd..4b904fdd23 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XWarningMarker.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/warning/V2XWarningMarker.java
@@ -1,29 +1,29 @@
package com.mogo.eagle.core.function.v2x.events.scenario.scene.warning;
-import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
+import static com.mogo.eagle.core.data.constants.DataTypes.TYPE_MARKER_CLOUD_STOP_LINE_DATA;
+import static com.mogo.eagle.core.data.constants.DataTypes.TYPE_MARKER_CLOUD_WARN_DATA;
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.V2X_FRONT_WARNING_MARKER;
-import static com.mogo.module.common.constants.DataTypes.TYPE_MARKER_CLOUD_STOP_LINE_DATA;
-import static com.mogo.module.common.constants.DataTypes.TYPE_MARKER_CLOUD_WARN_DATA;
+import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.commons.AbsMogoApplication;
+import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
-import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
+import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.function.v2x.events.entity.model.DrawLineInfo;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoPersonWarnPolylineManager;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoStopPolylineManager;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoWarnPolylineManager;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
+import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.map.MogoMarkerManager;
import com.mogo.map.marker.IMogoMarkerManager;
import com.mogo.map.overlay.IMogoPolyline;
-import com.mogo.module.common.MogoApisHandler;
-import com.mogo.module.common.drawer.V2XWarnDataDrawer;
import com.mogo.module.common.utils.Trigonometric;
import com.mogo.v2x.data.V2XLocation;
import com.mogo.v2x.data.V2XWarningTarget;
@@ -31,6 +31,7 @@ import com.mogo.v2x.data.V2XWarningTarget;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import java.util.Objects;
/**
* @author liujing
@@ -110,7 +111,7 @@ public class V2XWarningMarker implements IV2XMarker {
warningLocation);
*/
- V2XWarnDataDrawer.getInstance().renderWarnData(mCloundWarningInfo.getLon(), mCloundWarningInfo.getLat(), mCloundWarningInfo.getType(), mCloundWarningInfo.getCollisionLat(), mCloundWarningInfo.getCollisionLon(), mCloundWarningInfo.getAngle(), mCloundWarningInfo.getShowTime());
+ Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerService()).renderWarningMoveMarker(mCloundWarningInfo.getLon(), mCloundWarningInfo.getLat(), mCloundWarningInfo.getType(), mCloundWarningInfo.getCollisionLat(), mCloundWarningInfo.getCollisionLon(), mCloundWarningInfo.getAngle(), mCloundWarningInfo.getShowTime());
//添加停止线marker
//衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
@@ -134,8 +135,13 @@ public class V2XWarningMarker implements IV2XMarker {
CallerLogger.INSTANCE.d(M_V2X + TAG, "数据为空carLocation == null");
}
*/
- V2XWarnDataDrawer.getInstance().renderWarnData(mCloundWarningInfo.getLon(), mCloundWarningInfo.getLat(), mCloundWarningInfo.getType(), mCloundWarningInfo.getCollisionLat(), mCloundWarningInfo.getCollisionLon(), mCloundWarningInfo.getAngle(), mCloundWarningInfo.getShowTime());
-
+ Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerService()).renderWarningMoveMarker(mCloundWarningInfo.getLon()
+ , mCloundWarningInfo.getLat()
+ , mCloundWarningInfo.getType()
+ , mCloundWarningInfo.getCollisionLat()
+ , mCloundWarningInfo.getCollisionLon()
+ , mCloundWarningInfo.getAngle()
+ , mCloundWarningInfo.getShowTime());
}, 0);
}
@@ -271,7 +277,7 @@ public class V2XWarningMarker implements IV2XMarker {
entity.setLat(latLng.lat);
entity.setLon(latLng.lon);
entity.setHeading(mCloundWarningInfo.getHeading());
- V2XWarnDataDrawer.getInstance().renderStopLineData(entity.getLon(), entity.getLat());
+ Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerService()).renderStopLineMarker(entity.getLon(), entity.getLat());
}
}
} catch (Exception e) {
@@ -417,7 +423,7 @@ public class V2XWarningMarker implements IV2XMarker {
for (int i = 0; i < count; i++) {
MogoLatLng newLo = Trigonometric.getNewLocation(
startLatLng.getLon(), startLatLng.getLat(), 5 * (i + 1), Trigonometric.getAngle(startLatLng.lon, startLatLng.lat, endLatLng.lon, endLatLng.lat));
- V2XWarnDataDrawer.getInstance().drawerArrowsMarkerWithLocation(newLo, WARNING_ARROWS, 10, new Double(rotate).intValue());
+ Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMarkerService()).drawerArrowsMarkerWithLocation(newLo, WARNING_ARROWS, 10, new Double(rotate).intValue());
CallerLogger.INSTANCE.d(M_V2X + TAG, "小箭头位置" + newLo);
}
}
@@ -427,7 +433,7 @@ public class V2XWarningMarker implements IV2XMarker {
//线随车动
public void onCarLocationChanged2(MogoLocation latLng) {
carLocation = new MogoLatLng(latLng.getLatitude(), latLng.getLongitude());
- if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() && isSelfLineClear == false) {
+ if (MogoStatusManager.getInstance().isVrMode() && !isSelfLineClear) {
if (mCloundWarningInfo != null) {
V2XLocation v2XLocation = new V2XLocation();
v2XLocation.setLat(latLng.getLatitude());
@@ -437,7 +443,7 @@ public class V2XWarningMarker implements IV2XMarker {
//衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
//drawSelfCarLine(latLng.getLongitude(), latLng.getLatitude(), latLng.getBearing());
}
- CallerLogger.INSTANCE.d(M_V2X + TAG, "车辆行驶轨迹" + String.valueOf(latLng.getLongitude()) + "," + String.valueOf(latLng.getLatitude()));
+ CallerLogger.INSTANCE.d(M_V2X + TAG, "车辆行驶轨迹" + latLng.getLongitude() + "," + latLng.getLatitude());
}
@Override
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/EntityUtils.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/EntityUtils.kt
index 2165993bf9..042c5b9e54 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/EntityUtils.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/EntityUtils.kt
@@ -1,8 +1,8 @@
package com.mogo.eagle.core.function.v2x.events.utils
-import com.mogo.module.common.entity.MarkerExploreWay
-import com.mogo.module.common.entity.MarkerLocation
-import com.mogo.module.common.entity.MarkerUserInfo
+import com.mogo.eagle.core.data.map.entity.MarkerExploreWay
+import com.mogo.eagle.core.data.map.entity.MarkerLocation
+import com.mogo.eagle.core.data.map.entity.MarkerUserInfo
import com.mogo.v2x.data.MarkerExploreWayItem
import com.mogo.v2x.data.V2XMarkerExploreWay
import com.mogo.v2x.data.V2XMarkerLocation
@@ -16,7 +16,7 @@ fun V2XMarkerLocation?.toMarkerLocation(): MarkerLocation? = if (this == null) n
it.angle = this.angle
}
-fun MarkerExploreWayItem?.toMarkerExploreWayItem(): com.mogo.module.common.entity.MarkerExploreWayItem? = if (this == null) null else com.mogo.module.common.entity.MarkerExploreWayItem().also {
+fun MarkerExploreWayItem?.toMarkerExploreWayItem(): com.mogo.eagle.core.data.map.entity.MarkerExploreWayItem? = if (this == null) null else com.mogo.eagle.core.data.map.entity.MarkerExploreWayItem().also {
it.illegalCount = this.illegalCount
it.content = this.content
it.url = this.url
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 1dbffa8b64..65b023b98d 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
@@ -1,20 +1,19 @@
package com.mogo.eagle.core.function.v2x.events.utils;
-import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING;
+import static com.mogo.eagle.core.data.map.entity.V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING;
import com.mogo.eagle.core.data.map.MogoLatLng;
+import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
+import com.mogo.eagle.core.data.map.entity.MarkerLocation;
+import com.mogo.eagle.core.data.map.entity.MarkerResponse;
+import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
+import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
+import com.mogo.eagle.core.data.map.entity.V2XWarningEntity;
import com.mogo.eagle.core.function.v2x.R;
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes;
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSpecialCarRes;
import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.eagle.core.utilcode.util.Utils;
-import com.mogo.module.common.entity.MarkerExploreWay;
-import com.mogo.module.common.entity.MarkerLocation;
-import com.mogo.module.common.entity.MarkerResponse;
-import com.mogo.module.common.entity.V2XMessageEntity;
-import com.mogo.module.common.entity.V2XRoadEventEntity;
-import com.mogo.module.common.entity.V2XWarningEntity;
-import com.mogo.v2x.event.V2XEvent;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/V2XSQLiteUtils.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/V2XSQLiteUtils.java
index ffcd3ce0d4..19e697b0e1 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/V2XSQLiteUtils.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/utils/V2XSQLiteUtils.java
@@ -2,13 +2,13 @@ package com.mogo.eagle.core.function.v2x.events.utils;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
+import com.mogo.eagle.core.data.map.entity.V2XEventZanData;
+import com.mogo.eagle.core.data.map.entity.V2XHistoryScenarioData;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.eagle.core.utilcode.mogo.sqlite.SQLIDao;
import com.mogo.eagle.core.utilcode.util.TimeUtils;
import com.mogo.eagle.core.utilcode.util.Utils;
-import com.mogo.module.common.entity.V2XEventZanData;
-import com.mogo.module.common.entity.V2XHistoryScenarioData;
import com.mogo.utils.sqlite.SQLDaoFactory;
import java.util.List;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/HeartLikeView.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/HeartLikeView.java
index d9e1775efd..4f123ab83c 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/HeartLikeView.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/HeartLikeView.java
@@ -12,9 +12,8 @@ import android.widget.LinearLayout;
import androidx.annotation.Nullable;
+import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.function.v2x.R;
-import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
-import com.mogo.service.statusmanager.IMogoStatusManager;
/**
@@ -42,11 +41,7 @@ public class HeartLikeView extends LinearLayout implements Animator.AnimatorList
super(context, attrs, defStyleAttr);
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.HeartLikeView, defStyleAttr,
0);
- boolean isVrMode = false;
- IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
- if (statusManager != null) {
- isVrMode = statusManager.isVrMode();
- }
+ boolean isVrMode = MogoStatusManager.getInstance().isVrMode();
boolean showGrayBack = typedArray.getBoolean(R.styleable.HeartLikeView_showGrayBack, false);
@@ -57,14 +52,12 @@ public class HeartLikeView extends LinearLayout implements Animator.AnimatorList
inflate(context, isVrMode ? R.layout.view_heart_like_vr : R.layout.view_heart_like, this);
mIllegalParkingLike = findViewById(R.id.ivIllegalParkingLike);
}
-
- boolean finalIsVrMode = isVrMode;
setOnClickListener(v -> {
if (!isAnimator) {
isAnimator = true;
if (mAnimatorSet == null) {
mAnimatorSet = (AnimatorSet) AnimatorInflater.loadAnimator(getContext(),
- finalIsVrMode ? R.animator.v2x_like_heart_animation_vr : R.animator.v2x_like_heart_animation);
+ isVrMode ? R.animator.v2x_like_heart_animation_vr : R.animator.v2x_like_heart_animation);
mAnimatorSet.setTarget(mIllegalParkingLike);
mAnimatorSet.addListener(this);
}
@@ -84,12 +77,7 @@ public class HeartLikeView extends LinearLayout implements Animator.AnimatorList
if (mOnClickCallListener != null) {
mOnClickCallListener.onClicked(HeartLikeView.this);
}
- boolean isVrMode = false;
- IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
- if (statusManager != null) {
- isVrMode = statusManager.isVrMode();
- }
- if (isVrMode) {
+ if (MogoStatusManager.getInstance().isVrMode()) {
mIllegalParkingLike.setImageResource(R.drawable.module_common_icon_like_selected_vr);
}
}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/HeartUnLikeView.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/HeartUnLikeView.java
index b050310a98..1cc972fba2 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/HeartUnLikeView.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/HeartUnLikeView.java
@@ -13,9 +13,8 @@ import android.widget.LinearLayout;
import androidx.annotation.Nullable;
+import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.function.v2x.R;
-import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
-import com.mogo.service.statusmanager.IMogoStatusManager;
/**
@@ -42,29 +41,24 @@ public class HeartUnLikeView extends LinearLayout implements Animator.AnimatorLi
public HeartUnLikeView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
- boolean isVrMode = false;
- IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
- if (statusManager != null) {
- isVrMode = statusManager.isVrMode();
- }
+ boolean isVrMode = MogoStatusManager.getInstance().isVrMode();
inflate(context, isVrMode ? R.layout.view_heart_unlike_vr : R.layout.view_heart_unlike, this);
mIllegalParkingUnLike = findViewById(R.id.ivIllegalParkingUnLike);
animationImageView = findViewById(R.id.animationImage);
- boolean finalIsVrMode = isVrMode;
setOnClickListener(v -> {
if (!isAnimator) {
isAnimator = true;
if (mAnimatorSet == null) {
mAnimatorSet = (AnimatorSet) AnimatorInflater.loadAnimator(getContext(),
- finalIsVrMode ?
+ isVrMode ?
R.animator.v2x_unlike_heart_animation_vr : R.animator.v2x_unlike_heart_animation);
mAnimatorSet.setTarget(mIllegalParkingUnLike);
mAnimatorSet.addListener(this);
}
mAnimatorSet.start();
}
- if (finalIsVrMode) {
+ if (isVrMode) {
animationImageView.setVisibility(View.VISIBLE);
Animation animation = AnimationUtils.loadAnimation(getContext(), R.anim.v2x_unlike_heart_scale_ani_vr);
animationImageView.startAnimation(animation);
@@ -84,12 +78,7 @@ public class HeartUnLikeView extends LinearLayout implements Animator.AnimatorLi
if (mOnClickCallListener != null) {
mOnClickCallListener.onClicked(HeartUnLikeView.this);
}
- boolean isVrMode = false;
- IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
- if (statusManager != null) {
- isVrMode = statusManager.isVrMode();
- }
- if (isVrMode) {
+ if (MogoStatusManager.getInstance().isVrMode()) {
mIllegalParkingUnLike.setImageResource(R.drawable.module_common_icon_unlike_selected_vr);
}
}
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/SimpleCoverVideoPlayer.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/SimpleCoverVideoPlayer.kt
index 5833ae1535..280b79c49d 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/SimpleCoverVideoPlayer.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/SimpleCoverVideoPlayer.kt
@@ -7,6 +7,7 @@ import android.view.View
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bumptech.glide.request.RequestOptions
+import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.eagle.core.function.v2x.R
import com.mogo.eagle.core.widget.glide.SkinAbleBitmapTarget
import com.shuyu.gsyvideoplayer.GSYVideoManager
@@ -14,8 +15,6 @@ import com.shuyu.gsyvideoplayer.utils.GSYVideoType
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
import com.shuyu.gsyvideoplayer.video.base.GSYVideoView
import com.shuyu.gsyvideoplayer.video.base.GSYVideoViewBridge
-import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.statusManager
-import com.mogo.service.statusmanager.IMogoStatusManager
class SimpleCoverVideoPlayer : StandardGSYVideoPlayer {
@@ -45,12 +44,7 @@ class SimpleCoverVideoPlayer : StandardGSYVideoPlayer {
}
override fun getLayoutId(): Int {
- var isVrMode = false
- val statusManager: IMogoStatusManager? = statusManager()
- if (statusManager != null) {
- isVrMode = statusManager.isVrMode
- }
- if (isVrMode) {
+ if (MogoStatusManager.getInstance().isVrMode) {
return R.layout.v2x_road_video_plyer_layout_vr
}
return R.layout.v2x_road_video_plyer_layout
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/V2XCrossRoadVideoView.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/V2XCrossRoadVideoView.java
index c59152eb02..7a77aa786c 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/V2XCrossRoadVideoView.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/V2XCrossRoadVideoView.java
@@ -19,6 +19,7 @@ import com.mogo.cloud.trafficlive.api.ITrafficIntersectionLiveCallBack;
import com.mogo.cloud.trafficlive.api.MoGoAiCloudTrafficLive;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.data.map.MogoLocation;
+import com.mogo.eagle.core.data.map.entity.MarkerCarInfo;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.v2x.R;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
@@ -30,7 +31,6 @@ import com.mogo.eagle.core.widget.RoundLayout;
import com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer;
import com.mogo.map.MogoLocationClient;
import com.mogo.map.location.IMogoLocationClient;
-import com.mogo.module.common.entity.MarkerCarInfo;
import com.shuyu.gsyvideoplayer.GSYVideoManager;
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
import com.shuyu.gsyvideoplayer.cache.CacheFactory;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/V2XLiveGSYVideoView.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/V2XLiveGSYVideoView.java
index 66e9597a30..a17198c64f 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/V2XLiveGSYVideoView.java
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/view/V2XLiveGSYVideoView.java
@@ -16,6 +16,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.ContextCompat;
import com.mogo.commons.voice.AIAssist;
+import com.mogo.eagle.core.data.map.entity.MarkerCarInfo;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.v2x.R;
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener;
@@ -24,7 +25,6 @@ import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceManager;
import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.eagle.core.utilcode.util.Utils;
import com.mogo.eagle.core.widget.RoundLayout;
-import com.mogo.module.common.entity.MarkerCarInfo;
import com.tencent.rtmp.ITXLivePlayListener;
import com.tencent.rtmp.TXLiveConstants;
import com.tencent.rtmp.TXLivePlayConfig;
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/redlightwarning/RedLightWarningManager.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/redlightwarning/RedLightWarningManager.kt
index c4ac037c7d..dd7f938765 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/redlightwarning/RedLightWarningManager.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/redlightwarning/RedLightWarningManager.kt
@@ -1,6 +1,5 @@
package com.mogo.eagle.core.function.v2x.redlightwarning
-import android.location.Location
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_IVP
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_IVP_GREEN
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I
@@ -20,7 +19,7 @@ import com.mogo.eagle.core.function.v2x.trafficlight.core.MogoTrafficLightManage
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import com.mogo.eagle.core.utilcode.util.ThreadUtils
-import com.mogo.module.common.enums.EventTypeEnum
+import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.zhjt.service_biz.BizConfig
import kotlin.math.abs
import kotlin.math.ceil
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/network/TrafficLightNetWorkModel.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/network/TrafficLightNetWorkModel.kt
index f9a30eeb9a..880ecafd32 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/network/TrafficLightNetWorkModel.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/network/TrafficLightNetWorkModel.kt
@@ -8,7 +8,7 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.network.apiCall
import com.mogo.eagle.core.network.cancel
import com.mogo.eagle.core.network.request
-import com.mogo.module.common.constants.HostConst.CITY_HOST
+import com.mogo.eagle.core.data.constants.HostConst.CITY_HOST
class TrafficLightNetWorkModel {
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt
index affbba02b8..031de57a8d 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt
@@ -25,7 +25,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
-import com.mogo.module.common.enums.EventTypeEnum
+import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.zhjt.service_biz.BizConfig
class VipCarManager : IMogoOnMessageListener, IMoGoTrafficLightListener,
diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/network/VipNetWorkModel.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/network/VipNetWorkModel.kt
index 5d44e53012..350a24dc78 100644
--- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/network/VipNetWorkModel.kt
+++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/network/VipNetWorkModel.kt
@@ -6,7 +6,7 @@ import com.mogo.eagle.core.data.v2x.VipRequest
import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.network.apiCall
import com.mogo.eagle.core.network.request
-import com.mogo.module.common.constants.HostConst.DATA_SERVICE_HOST
+import com.mogo.eagle.core.data.constants.HostConst.DATA_SERVICE_HOST
class VipNetWorkModel {
diff --git a/core/mogo-core-data/build.gradle b/core/mogo-core-data/build.gradle
index 8405737a50..4bda16c773 100644
--- a/core/mogo-core-data/build.gradle
+++ b/core/mogo-core-data/build.gradle
@@ -66,6 +66,7 @@ dependencies {
} else {
implementation project(':core:mogo-core-res')
api project(":libraries:mogo-adas-data")
+ api project(':core:mogo-core-utils')
}
}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/DataTypes.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/DataTypes.java
similarity index 96%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/DataTypes.java
rename to core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/DataTypes.java
index 5bb7d02c3d..e1e11c3fbb 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/DataTypes.java
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/DataTypes.java
@@ -1,4 +1,4 @@
-package com.mogo.module.common.constants;
+package com.mogo.eagle.core.data.constants;
public
/**
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/HostConst.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/HostConst.java
similarity index 96%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/HostConst.java
rename to core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/HostConst.java
index db14171a5e..b5ca4488e6 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/HostConst.java
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/HostConst.java
@@ -1,4 +1,4 @@
-package com.mogo.module.common.constants;
+package com.mogo.eagle.core.data.constants;
/**
* 通用接口请求host
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/RoomConstants.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/RoomConstants.java
similarity index 81%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/RoomConstants.java
rename to core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/RoomConstants.java
index 406e9d4840..3be960e813 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/constants/RoomConstants.java
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/RoomConstants.java
@@ -1,4 +1,4 @@
-package com.mogo.module.common.constants;
+package com.mogo.eagle.core.data.constants;
/**
* 数据库常量
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnum.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnum.kt
similarity index 99%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnum.kt
rename to core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnum.kt
index f9468f192f..956ff35fd1 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeEnum.kt
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnum.kt
@@ -1,8 +1,7 @@
-package com.mogo.module.common.enums
+package com.mogo.eagle.core.data.enums
import com.mogo.module.common.R
import com.mogo.module.common.utils.CloudPoiManager
-import com.zhidao.support.obu.constants.ObuConstants
/**
* OBU、V2N事件类型枚举类
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeHelper.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeHelper.kt
similarity index 97%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeHelper.kt
rename to core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeHelper.kt
index 59d0db1c9f..8f8cd1ff35 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/enums/EventTypeHelper.kt
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeHelper.kt
@@ -1,4 +1,4 @@
-package com.mogo.module.common.enums
+package com.mogo.eagle.core.data.enums
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_AVW
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_BSW
@@ -13,9 +13,6 @@ import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_VRU
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_VRU_RI
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2N
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2V
-import com.mogo.eagle.core.data.enums.WarningDirectionEnum
-import com.mogo.eagle.core.data.enums.isLeft
-import com.mogo.eagle.core.data.enums.isRight
import com.zhjt.service_biz.BizConfig
class EventTypeHelper {
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/MarkerShowEntity.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/MarkerShowEntity.java
index 6b57cbf3bd..bf8ef0c3c1 100644
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/MarkerShowEntity.java
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/MarkerShowEntity.java
@@ -28,7 +28,6 @@ public class MarkerShowEntity {
private Object bindObj;
//Marker 经纬度位置信息
private MarkerLocation markerLocation;
- private IMogoMarker mMarker;
public boolean isChecked() {
return isChecked;
@@ -101,14 +100,6 @@ public class MarkerShowEntity {
Objects.equals(markerLocation, that.markerLocation);
}
- public void setMarker( IMogoMarker marker ) {
- this.mMarker = marker;
- }
-
- public IMogoMarker getMarker() {
- return mMarker;
- }
-
@Override
public int hashCode() {
return Objects.hash(iconUrl, textContent, markerType, bindObj, markerLocation);
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XHistoryScenarioData.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XHistoryScenarioData.java
index 51fe4c2871..1256fde084 100644
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XHistoryScenarioData.java
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XHistoryScenarioData.java
@@ -1,6 +1,6 @@
package com.mogo.eagle.core.data.map.entity;
-import com.mogo.module.common.constants.RoomConstants;
+import com.mogo.eagle.core.data.constants.RoomConstants;
import com.mogo.utils.sqlite.annotation.DbDatabase;
import com.mogo.utils.sqlite.annotation.DbField;
import com.mogo.utils.sqlite.annotation.DbTable;
diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XRoadEventEntity.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XRoadEventEntity.java
index 809d6463a5..b6ea46986b 100644
--- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XRoadEventEntity.java
+++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/map/entity/V2XRoadEventEntity.java
@@ -70,6 +70,10 @@ public class V2XRoadEventEntity implements Serializable {
isShowEventButton = showEventButton;
}
+ public String getAlarmContent(){ //todo 缺少
+ return alarmContent;
+ }
+
public void setAlarmContent(String alarmContent) {
this.alarmContent = alarmContent;
}
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/map/marker/IMogoMarkerService.java b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/map/marker/IMogoMarkerService.java
index e411c3b652..e22a80b7bb 100644
--- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/map/marker/IMogoMarkerService.java
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/map/marker/IMogoMarkerService.java
@@ -2,6 +2,8 @@ package com.mogo.eagle.core.function.api.map.marker;
import androidx.annotation.Nullable;
+import com.mogo.eagle.core.data.map.MogoLatLng;
+import com.mogo.eagle.core.data.traffic.TrafficData;
import com.mogo.map.marker.IMogoMarker;
@@ -13,4 +15,52 @@ public interface IMogoMarkerService {
*/
@Nullable
IMogoMarker drawMarker(Object object);
+
+ /**
+ * 识别物体移动
+ * @param lon
+ * @param lat
+ * @param type
+ * @param collisionlat
+ * @param collisionLon
+ * @param angle
+ * @param showTime
+ */
+ void renderWarningMoveMarker(double lon, double lat, int type, double collisionlat, double collisionLon, double angle, long showTime);
+
+ /**
+ * 绘制停止线marker
+ * @param lon
+ * @param lat
+ */
+ void renderStopLineMarker(double lon, double lat);
+
+ void drawerArrowsMarkerWithLocation(MogoLatLng location, String markerType, int type, int rotate);
+
+ /**
+ * 更新OBU/V2X传来的 单个物体感知数据
+ * @param trafficData
+ */
+ void updateITrafficInfo(TrafficData trafficData);
+
+ /**
+ * 更新数据
+ */
+ void updateITrafficLocationInfo(TrafficData trafficData);
+
+ /**
+ * 更新识别数据颜色
+ */
+ void updateITrafficThreatLevelInfo(TrafficData trafficData);
+
+ /**
+ * 移除OBU/V2X传来的 单个物体感知数据
+ * @param uuid
+ */
+ void removeCvxRvInfoIndInfo(String uuid);
+
+
+
+
+
}
diff --git a/foudations/mogo-commons/src/main/AndroidManifest.xml b/foudations/mogo-commons/src/main/AndroidManifest.xml
index 2eed2c43cb..4e20539844 100644
--- a/foudations/mogo-commons/src/main/AndroidManifest.xml
+++ b/foudations/mogo-commons/src/main/AndroidManifest.xml
@@ -5,7 +5,7 @@
-
diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/module/MogoServices.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/MogoServices.java
index a3e62b791a..2a80af3028 100644
--- a/foudations/mogo-commons/src/main/java/com/mogo/commons/module/MogoServices.java
+++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/MogoServices.java
@@ -13,7 +13,7 @@ import com.mogo.commons.module.intent.IMogoIntentListener;
import com.mogo.commons.module.intent.IntentHandlerFactory;
import com.mogo.commons.module.intent.IntentManager;
import com.mogo.commons.module.status.MogoStatusManager;
-import com.mogo.commons.receiver.MogoReceiver;
+import com.mogo.commons.module.receiver.MogoReceiver;
import com.mogo.commons.voice.AIAssist;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/module/intent/IntentHandlerFactory.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/intent/IntentHandlerFactory.java
index 1ca65f58df..93ccf07129 100644
--- a/foudations/mogo-commons/src/main/java/com/mogo/commons/module/intent/IntentHandlerFactory.java
+++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/intent/IntentHandlerFactory.java
@@ -4,7 +4,7 @@ import android.content.Context;
import android.content.Intent;
-import com.mogo.commons.receiver.MogoReceiver;
+import com.mogo.commons.module.receiver.MogoReceiver;
import java.util.HashMap;
import java.util.Map;
diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/module/intent/VoiceUiIntentHandler.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/intent/VoiceUiIntentHandler.java
index 6ffd0bb3ca..7021e5915d 100644
--- a/foudations/mogo-commons/src/main/java/com/mogo/commons/module/intent/VoiceUiIntentHandler.java
+++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/intent/VoiceUiIntentHandler.java
@@ -5,7 +5,7 @@ import android.content.Intent;
import android.text.TextUtils;
import com.mogo.commons.module.status.MogoStatusManager;
-import com.mogo.commons.receiver.MogoReceiver;
+import com.mogo.commons.module.receiver.MogoReceiver;
public class VoiceUiIntentHandler implements IntentHandler {
diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/receiver/AccStatusReceiver.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/receiver/AccStatusReceiver.java
similarity index 90%
rename from foudations/mogo-commons/src/main/java/com/mogo/commons/receiver/AccStatusReceiver.java
rename to foudations/mogo-commons/src/main/java/com/mogo/commons/module/receiver/AccStatusReceiver.java
index d92b9b9a7e..ba12e69d9c 100644
--- a/foudations/mogo-commons/src/main/java/com/mogo/commons/receiver/AccStatusReceiver.java
+++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/receiver/AccStatusReceiver.java
@@ -1,4 +1,4 @@
-package com.mogo.commons.receiver;
+package com.mogo.commons.module.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/receiver/MogoReceiver.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/receiver/MogoReceiver.java
similarity index 97%
rename from foudations/mogo-commons/src/main/java/com/mogo/commons/receiver/MogoReceiver.java
rename to foudations/mogo-commons/src/main/java/com/mogo/commons/module/receiver/MogoReceiver.java
index 1bf9ed8813..96670ceb43 100644
--- a/foudations/mogo-commons/src/main/java/com/mogo/commons/receiver/MogoReceiver.java
+++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/module/receiver/MogoReceiver.java
@@ -1,4 +1,4 @@
-package com.mogo.commons.receiver;
+package com.mogo.commons.module.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/Animation.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/Animation.java
deleted file mode 100644
index 3c0981fe05..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/Animation.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.mogo.module.common.animation;
-
-interface Animation {
-
- void start();
-
- void stop();
-
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/AnimationManager.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/AnimationManager.java
deleted file mode 100644
index b0732a7d97..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/AnimationManager.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.mogo.module.common.animation;
-
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
-import android.view.View;
-import android.widget.ProgressBar;
-
-public class AnimationManager implements Animation {
-
- private static final String TAG = "V2XAnimationManager";
- private ProgressBar targetImageView;
- private boolean isStarted = false;
-
- private int mStartIndex = 0;
-
- private final static int MSG_LOOP = 3004;
- private long INTERVAL = 100L;
-
- private Handler mHandler = new Handler(Looper.getMainLooper()) {
- @Override
- public void handleMessage(Message msg) {
- super.handleMessage(msg);
- switch (msg.what) {
- case MSG_LOOP:
- if (isStarted) {
-// targetImageView.setImageResource( AnimationResources.loadingRes[mStartIndex++ % AnimationResources.loadingRes.length] );
- mHandler.sendEmptyMessageDelayed(MSG_LOOP, INTERVAL);
- }
- break;
- }
- }
- };
-
- public void animationWithTarget(ProgressBar imageView, int[] resources, int duration) {
- targetImageView = imageView;
- INTERVAL = duration;
- start();
-
- }
-
- @Override
- synchronized public void start() {
- isStarted = true;
- mHandler.sendEmptyMessage(MSG_LOOP);
- if (targetImageView != null) {
- targetImageView.setVisibility(View.VISIBLE);
- }
- }
-
- @Override
- synchronized public void stop() {
- isStarted = false;
- mHandler.removeMessages(MSG_LOOP);
- if (targetImageView != null) {
- targetImageView.setVisibility(View.INVISIBLE);
- }
- }
-
- public void soptWithError() {
- stop();
- if (targetImageView != null) {
- targetImageView.setVisibility(View.VISIBLE);
- }
- }
-
- public void release() {
- stop();
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/AnimationResources.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/AnimationResources.java
deleted file mode 100644
index 8919d777e6..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/AnimationResources.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.mogo.module.common.animation;
-
-
-import com.mogo.module.common.R;
-
-public class AnimationResources {
- public static final int loadingRes[] = {
-// R.drawable.v_to_x_loading_car0000,
-// R.drawable.v_to_x_loading_car0002,
-// R.drawable.v_to_x_loading_car0004,
-// R.drawable.v_to_x_loading_car0006,
-// R.drawable.v_to_x_loading_car0008,
-// R.drawable.v_to_x_loading_car0010,
-// R.drawable.v_to_x_loading_car0012,
-// R.drawable.v_to_x_loading_car0014,
-// R.drawable.v_to_x_loading_car0016,
-// R.drawable.v_to_x_loading_car0018,
-// R.drawable.v_to_x_loading_car0020,
-// R.drawable.v_to_x_loading_car0022,
-// R.drawable.v_to_x_loading_car0024,
-// R.drawable.v_to_x_loading_car0025,
-// R.drawable.v_to_x_loading_car0027,
-// R.drawable.v_to_x_loading_car0029,
-// R.drawable.v_to_x_loading_car0031,
-// R.drawable.v_to_x_loading_car0033,
-// R.drawable.v_to_x_loading_car0035,
-// R.drawable.v_to_x_loading_car0037,
-// R.drawable.v_to_x_loading_car0039,
-// R.drawable.v_to_x_loading_car0041,
-// R.drawable.v_to_x_loading_car0043,
-// R.drawable.v_to_x_loading_car0045,
-// R.drawable.v_to_x_loading_car0047,
-// R.drawable.v_to_x_loading_car0048,
- };
-
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierEvaluator.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierEvaluator.java
deleted file mode 100644
index b7be514fa9..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierEvaluator.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.mogo.module.common.animation;
-
-import android.animation.TypeEvaluator;
-import android.graphics.PointF;
-
-/**
- * 贝塞尔曲线估值器:计算动画的执行轨迹
- *
- * @params 传入贝塞尔曲线需要的四个点
- * @return 通过计算返回贝塞尔曲线的坐标
- */
-public class BezierEvaluator implements TypeEvaluator {
-
- private PointF point1;
- private PointF point2;
-
- public BezierEvaluator(PointF point1, PointF point2) {
- this.point1 = point1;
- this.point2 = point2;
- }
-
- @Override
- public PointF evaluate(float t, PointF point0, PointF point3) {
- PointF point = new PointF();
- //t 取值为 [0,1]
-
- /**
- * 三阶贝塞尔公式
- *
- * B(t)=(1 - t)^3 P0
- * + 3 t (1 - t)^2 P1
- * + 3 t^2 (1 - t) P2
- * + t^3 P3
- */
- point.x = point0.x * (1 - t) * (1 - t) * (1 - t)
- + 3 * point1.x * t * (1 - t) * (1 - t)
- + 3 * point2.x * t * t * (1 - t)
- + point3.x * t * t * t;
-
- /**
- * 三阶贝塞尔公式
- *
- * B(t)=(1 - t)^3 P0
- * + 3 t (1 - t)^2 P1
- * + 3 t^2 (1 - t) P2
- * + t^3 P3
- */
- point.y = point0.y * (1 - t) * (1 - t) * (1 - t)
- + 3 * point1.y * t * (1 - t) * (1 - t)
- + 3 * point2.y * t * t * (1 - t)
- + point3.y * t * t * t;
-
- return point;
- }
-}
\ No newline at end of file
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierListener.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierListener.java
deleted file mode 100644
index 04ab1129c2..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/animation/BezierListener.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.mogo.module.common.animation;
-
-import android.animation.ValueAnimator;
-import android.graphics.PointF;
-import android.view.View;
-
-public class BezierListener implements ValueAnimator.AnimatorUpdateListener {
-
- private View target;
-
- public BezierListener(View target) {
- this.target = target;
- }
-
- @Override
- public void onAnimationUpdate(ValueAnimator animation) {
- //这里获取到贝塞尔曲线计算出来的的x y值 赋值给view 这样就能让爱心随着曲线走啦
- PointF pointF = (PointF) animation.getAnimatedValue();
- target.setX(pointF.x);
- target.setY(pointF.y);
- // 这里偷个懒,顺便做一个alpha动画,这样alpha渐变也完成啦
- target.setAlpha(1 - animation.getAnimatedFraction());
- }
-}
\ No newline at end of file
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerActivitiesScope.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerActivitiesScope.java
deleted file mode 100644
index 90df97f521..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerActivitiesScope.java
+++ /dev/null
@@ -1,41 +0,0 @@
-
-package com.mogo.module.common.entity;
-
-
-import android.text.TextUtils;
-
-import java.io.Serializable;
-
-@SuppressWarnings("unused")
-public class MarkerActivitiesScope implements Serializable {
-
- private String content;
- private boolean isCheck;
-
- public String getContent() {
- if (TextUtils.isEmpty(content)) {
- return "";
- }
- return content;
- }
-
- public void setContent(String content) {
- this.content = content;
- }
-
- public boolean getIsCheck() {
- return isCheck;
- }
-
- public void setIsCheck(boolean isCheck) {
- this.isCheck = isCheck;
- }
-
- @Override
- public String toString() {
- return "MarkerActivitiesScope{" +
- "content='" + content + '\'' +
- ", isCheck=" + isCheck +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCarChat.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCarChat.java
deleted file mode 100644
index 8a87118e91..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCarChat.java
+++ /dev/null
@@ -1,46 +0,0 @@
-
-package com.mogo.module.common.entity;
-
-
-import java.io.Serializable;
-
-@SuppressWarnings("unused")
-public class MarkerCarChat implements Serializable {
-
- private String type;
- private MarkerLocation location;
- private MarkerUserInfo userInfo;
-
- public MarkerLocation getLocation() {
- return location;
- }
-
- public void setLocation(MarkerLocation location) {
- this.location = location;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public MarkerUserInfo getUserInfo() {
- return userInfo;
- }
-
- public void setUserInfo(MarkerUserInfo userInfo) {
- this.userInfo = userInfo;
- }
-
- @Override
- public String toString() {
- return "MarkerCarChat{" +
- "location=" + location +
- ", type='" + type + '\'' +
- ", userInfo=" + userInfo +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCarInfo.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCarInfo.java
deleted file mode 100644
index 3ff892d263..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCarInfo.java
+++ /dev/null
@@ -1,106 +0,0 @@
-
-package com.mogo.module.common.entity;
-
-
-import android.text.TextUtils;
-
-import java.io.Serializable;
-
-@SuppressWarnings("unused")
-public class MarkerCarInfo implements Serializable {
-
- private String carBrandLogoUrl;
- private String carTypeName;
- private int vehicleType;
- private CarLiveInfo carLiveInfo;
-
- public String getCarBrandLogoUrl() {
- if (TextUtils.isEmpty(carBrandLogoUrl)) {
- return "";
- }
- return carBrandLogoUrl;
- }
-
- public void setCarBrandLogoUrl(String carBrandLogoUrl) {
- this.carBrandLogoUrl = carBrandLogoUrl;
- }
-
- public String getCarTypeName() {
- if (TextUtils.isEmpty(carTypeName)) {
- return "";
- }
- return carTypeName;
- }
-
- public void setCarTypeName(String carTypeName) {
- this.carTypeName = carTypeName;
- }
-
- public int getVehicleType() {
- return vehicleType;
- }
-
- public void setVehicleType(int vehicleType) {
- this.vehicleType = vehicleType;
- }
-
- public CarLiveInfo getCarLiveInfo() {
- return carLiveInfo;
- }
-
- public void setCarLiveInfo(CarLiveInfo carLiveInfo) {
- this.carLiveInfo = carLiveInfo;
- }
-
- public static class CarLiveInfo implements Serializable {
- //rtmp视频直播地址rtmp://
- private String videoUrl;
- //直播频道【直播心跳接口参数】C_1
- private String videoChannel;
- //直播源sn【直播心跳接口参数】XTCBA90740400625
- private String videoSn;
-
- public String getVideoUrl() {
- return videoUrl;
- }
-
- public void setVideoUrl(String videoUrl) {
- this.videoUrl = videoUrl;
- }
-
- public String getVideoChannel() {
- return videoChannel;
- }
-
- public void setVideoChannel(String videoChannel) {
- this.videoChannel = videoChannel;
- }
-
- public String getVideoSn() {
- return videoSn;
- }
-
- public void setVideoSn(String videoSn) {
- this.videoSn = videoSn;
- }
-
- @Override
- public String toString() {
- return "CarLiveInfo{" +
- "videoUrl='" + videoUrl + '\'' +
- ", videoChannel='" + videoChannel + '\'' +
- ", videoSn='" + videoSn + '\'' +
- '}';
- }
- }
-
- @Override
- public String toString() {
- return "MarkerCarInfo{" +
- "carBrandLogoUrl='" + carBrandLogoUrl + '\'' +
- ", carTypeName='" + carTypeName + '\'' +
- ", vehicleType=" + vehicleType +
- ", carLiveInfo=" + carLiveInfo +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCarPois.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCarPois.java
deleted file mode 100644
index 30c997b77d..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCarPois.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.mogo.module.common.entity;
-
-import java.util.List;
-
-/**
- * Created by ihoudf on 2020-04-16.
- **/
-public class MarkerCarPois {
-
- private List coordinates;
- private double angle; // 车头角度
- private String adcode;
-
- public List getCoordinates() {
- return coordinates;
- }
-
- public void setCoordinates(List coordinates) {
- this.coordinates = coordinates;
- }
-
- public double getAngle() {
- return angle;
- }
-
- public void setAngle(double angle) {
- this.angle = angle;
- }
-
- public String getAdcode() {
- return adcode;
- }
-
- public void setAdcode(String adcode) {
- this.adcode = adcode;
- }
-
- @Override
- public String toString() {
- return "MarkerCarPois{" + "coordinates=" + coordinates + ", angle=" + angle + ", adcode" +
- "='" + adcode + '\'' + '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCardResult.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCardResult.java
index 86a14edad5..c3903a978c 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCardResult.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerCardResult.java
@@ -9,54 +9,9 @@ import java.util.List;
public class MarkerCardResult extends BaseData {
private List dataType; // 要查询的类型
- private List carChat;
- private List shareMusic;
- private List noveltyInfo;
- private List onlineCar;
- private List exploreWay;
private long messageTime;
- public List getCarChat() {
- return carChat;
- }
-
- public void setCarChat(List carChat) {
- this.carChat = carChat;
- }
-
- public List getExploreWay() {
- return exploreWay;
- }
-
- public void setExploreWay(List exploreWay) {
- this.exploreWay = exploreWay;
- }
-
- public List getOnlineCar() {
- return onlineCar;
- }
-
- public void setOnlineCar(List onlineCar) {
- this.onlineCar = onlineCar;
- }
-
- public List getShareMusic() {
- return shareMusic;
- }
-
- public void setShareMusic(List shareMusic) {
- this.shareMusic = shareMusic;
- }
-
- public List getNoveltyInfo() {
- return noveltyInfo;
- }
-
- public void setNoveltyInfo(List noveltyInfo) {
- this.noveltyInfo = noveltyInfo;
- }
-
public List getDataType() {
return dataType;
}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerDynamicData.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerDynamicData.java
deleted file mode 100644
index 656f115afb..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerDynamicData.java
+++ /dev/null
@@ -1,166 +0,0 @@
-
-package com.mogo.module.common.entity;
-
-
-import android.text.TextUtils;
-
-import java.io.Serializable;
-
-@SuppressWarnings("unused")
-public class MarkerDynamicData implements Serializable {
- //QQ音乐,懒人听书,乐听头条 2 为书籍听书,3 为新闻,1 为qq音乐
- private int type;
- private String mediaId;//qq音乐id,书的bookId
- //qq音乐url 懒人听书为“”
- private String mediaUrl;
- //歌曲名 ,当前播放书名,新闻标题内容
- private String mediaName;
- //演唱歌手,当前章节,新闻来源
- private String mediaSinger;
- //歌曲封面,书籍封面,新闻预览图
- private String mediaImg;
- //音乐类别,类似经典 ,流行只有qq特有
- private String mediaType;
- private int maxTime;//音频总时长
- private String bookInfo;//懒人听书json串
- //当前播放时长,可以不加,播放进度单独独立出来
- private int curTime;
- //是否是本地音频,只有qq音乐
- private boolean isLocalMedia;//本地
- //播放模式,顺序,单曲循环,随机
- private int mediaPlayMode;
- //1 播放 2 缓冲 0 暂停/停止 -1 播放错误
- private int playState;
-
- public String getMediaId() {
- return mediaId;
- }
-
- public void setMediaId(String mediaId) {
- this.mediaId = mediaId;
- }
-
- public String getMediaUrl() {
- return mediaUrl;
- }
-
- public void setMediaUrl(String mediaUrl) {
- this.mediaUrl = mediaUrl;
- }
-
- public int getType() {
- return type;
- }
-
- public void setType(int type) {
- this.type = type;
- }
-
- public int getPlayState() {
- return playState;
- }
-
- public void setPlayState(int playState) {
- this.playState = playState;
- }
-
- public String getMediaName() {
- if (TextUtils.isEmpty(mediaName)) {
- return "";
- }
- return mediaName;
- }
-
- public void setMediaName(String mediaName) {
- this.mediaName = mediaName;
- }
-
- public String getMediaSinger() {
- if (TextUtils.isEmpty(mediaSinger)) {
- return "";
- }
- return mediaSinger;
- }
-
- public void setMediaSinger(String mediaSinger) {
- this.mediaSinger = mediaSinger;
- }
-
- public String getMediaImg() {
- return mediaImg;
- }
-
- public void setMediaImg(String mediaImg) {
- this.mediaImg = mediaImg;
- }
-
- public long getMaxTime() {
- return maxTime;
- }
-
- public void setMaxTime(int maxTime) {
- this.maxTime = maxTime;
- }
-
- public long getCurTime() {
- return curTime;
- }
-
- public void setCurTime(int curTime) {
- this.curTime = curTime;
- }
-
- public String getMediaType() {
- if (TextUtils.isEmpty(mediaType)) {
- return "";
- }
- return mediaType;
- }
-
- public void setMediaType(String mediaType) {
- this.mediaType = mediaType;
- }
-
- public boolean isLocalMedia() {
- return isLocalMedia;
- }
-
- public void setLocalMedia(boolean localMedia) {
- isLocalMedia = localMedia;
- }
-
- public int getMediaPlayMode() {
- return mediaPlayMode;
- }
-
- public void setMediaPlayMode(int mediaPlayMode) {
- this.mediaPlayMode = mediaPlayMode;
- }
-
- public String getBookInfo() {
- return bookInfo;
- }
-
- public void setBookInfo(String bookInfo) {
- this.bookInfo = bookInfo;
- }
-
- @Override
- public String toString() {
- return "MarkerDynamicData{" +
- "type=" + type +
- ", mediaId='" + mediaId + '\'' +
- ", mediaUrl='" + mediaUrl + '\'' +
- ", mediaName='" + mediaName + '\'' +
- ", mediaSinger='" + mediaSinger + '\'' +
- ", mediaImg='" + mediaImg + '\'' +
- ", mediaType='" + mediaType + '\'' +
- ", maxTime=" + maxTime +
- ", bookInfo='" + bookInfo + '\'' +
- ", curTime=" + curTime +
- ", isLocalMedia=" + isLocalMedia +
- ", mediaPlayMode=" + mediaPlayMode +
- ", playState=" + playState +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java
deleted file mode 100644
index 7314267422..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java
+++ /dev/null
@@ -1,241 +0,0 @@
-
-package com.mogo.module.common.entity;
-
-import android.text.TextUtils;
-
-import com.mogo.module.common.enums.EventTypeEnum;
-
-import java.io.Serializable;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-@SuppressWarnings("unused")
-public class MarkerExploreWay implements Serializable {
-
- private String infoId;
- private String type;//卡片类型,
- /**
- * @see EventTypeEnum
- */
- private String poiType;
- private String sn;
- private MarkerLocation location;//位置信息
- private int direction;//方位角度
- private boolean canLive;//是否可直播(1为可直播,0不可直播)
- private int fileType;//是图片还是视频(1视频,0图片)
- private String addr;//北京市朝阳区三里屯街道108号
- private long generateTime;//时间戳
- private String cityName;//:"城市名称",
- private double distance;//距离
- private MarkerUserInfo userInfo;//用户信息
- private List items;//视频地址和图片地址
- //上报类型:1-用户上报,2-后台上报 3-三方上报
- private String uploadType;
-
- private boolean fabulous;
-
- // http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=42321443
- // 1 需要用户判断是否拥堵 进行UGC问答
- private int infoCheckNode;
-
- public Map extras = null;
-
- public String getAddr() {
- if (TextUtils.isEmpty(addr)) {
- return "未知道路";
- }
- return addr;
- }
-
- public void setAddr(String addr) {
- this.addr = addr;
- }
-
- public boolean getCanLive() {
- return canLive;
- }
-
- public void setCanLive(boolean canLive) {
- this.canLive = canLive;
- }
-
- public String getCityName() {
- return cityName;
- }
-
- public void setCityName(String cityName) {
- this.cityName = cityName;
- }
-
- public float getDirection() {
- return direction;
- }
-
- public void setDirection(int direction) {
- this.direction = direction;
- }
-
- public double getDistance() {
- return distance;
- }
-
- public void setDistance(double distance) {
- this.distance = distance;
- }
-
- public double getFileType() {
- return fileType;
- }
-
- public void setFileType(int fileType) {
- this.fileType = fileType;
- }
-
- public Long getGenerateTime() {
- return generateTime;
- }
-
- public void setGenerateTime(Long generateTime) {
- this.generateTime = generateTime;
- }
-
- public List getItems() {
- return items;
- }
-
- public void setItems(List items) {
- this.items = items;
- }
-
- public MarkerLocation getLocation() {
- return location;
- }
-
- public void setLocation(MarkerLocation location) {
- this.location = location;
- }
-
- public String getSn() {
- return sn;
- }
-
- public void setSn(String sn) {
- this.sn = sn;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public MarkerUserInfo getUserInfo() {
- return userInfo;
- }
-
- public void setUserInfo(MarkerUserInfo userInfo) {
- this.userInfo = userInfo;
- }
-
- public String getInfoId() {
- return infoId;
- }
-
-
- public int getInfoIdInt() {
- try {
- return Integer.parseInt(infoId);
- } catch (NumberFormatException e) {
- e.printStackTrace();
- return -1;
- }
- }
-
- public void setInfoId(String infoId) {
- this.infoId = infoId;
- }
-
- public String getPoiType() {
- if (TextUtils.isEmpty(poiType)) {
- return EventTypeEnum.FOURS_BLOCK_UP.getPoiType();
- }
- return poiType;
- }
-
- public void setPoiType(String poiType) {
- this.poiType = poiType;
- }
-
- public String getUploadType() {
- return uploadType;
- }
-
- public void setUploadType(String uploadType) {
- this.uploadType = uploadType;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- MarkerExploreWay that = (MarkerExploreWay) o;
- return Objects.equals(infoId, that.infoId) &&
- Objects.equals(type, that.type) &&
- Objects.equals(poiType, that.poiType);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(infoId, type, poiType);
- }
-
- public boolean isCanLive() {
- return canLive;
- }
-
- public void setGenerateTime(long generateTime) {
- this.generateTime = generateTime;
- }
-
- public int getInfoCheckNode() {
- return infoCheckNode;
- }
-
- public void setInfoCheckNode(int infoCheckNode) {
- this.infoCheckNode = infoCheckNode;
- }
-
- public boolean isFabulous() {
- return fabulous;
- }
-
- public void setFabulous(boolean fabulous) {
- this.fabulous = fabulous;
- }
-
- @Override
- public String toString() {
- return "MarkerExploreWay{" +
- "infoId='" + infoId + '\'' +
- ", type='" + type + '\'' +
- ", poiType='" + poiType + '\'' +
- ", sn='" + sn + '\'' +
- ", location=" + location +
- ", direction=" + direction +
- ", canLive=" + canLive +
- ", fileType=" + fileType +
- ", addr='" + addr + '\'' +
- ", generateTime=" + generateTime +
- ", cityName='" + cityName + '\'' +
- ", distance=" + distance +
- ", userInfo=" + userInfo +
- ", items=" + items +
- ", uploadType='" + uploadType + '\'' +
- ", fabulous=" + fabulous +
- ", infoCheckNode=" + infoCheckNode +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWayItem.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWayItem.java
deleted file mode 100644
index 47f9d1857f..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWayItem.java
+++ /dev/null
@@ -1,67 +0,0 @@
-
-package com.mogo.module.common.entity;
-
-
-import android.text.TextUtils;
-
-import java.io.Serializable;
-
-/**
- * 道路情报,V2X预警,地图道路事件POI,违章停车POI等
- */
-@SuppressWarnings("unused")
-public class MarkerExploreWayItem implements Serializable {
-
- private String thumbnail;
- private String url;
- private String content;
- private double illegalCount;
-
- public String getThumbnail() {
- if (TextUtils.isEmpty(thumbnail)) {
- return "";
- }
- return thumbnail;
- }
-
- public void setThumbnail(String thumbnail) {
- this.thumbnail = thumbnail;
- }
-
- public String getUrl() {
- if (TextUtils.isEmpty(url)) {
- return "";
- }
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public String getContent() {
- return content;
- }
-
- public void setContent(String content) {
- this.content = content;
- }
-
- public double getIllegalCount() {
- return illegalCount;
- }
-
- public void setIllegalCount(double illegalCount) {
- this.illegalCount = illegalCount;
- }
-
- @Override
- public String toString() {
- return "MarkerExploreWayItem{" +
- "thumbnail='" + thumbnail + '\'' +
- ", url='" + url + '\'' +
- ", content='" + content + '\'' +
- ", illegalCount='" + illegalCount + '\'' +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerHobbyDatum.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerHobbyDatum.java
deleted file mode 100644
index a190f2f759..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerHobbyDatum.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package com.mogo.module.common.entity;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * author : donghongyu
- * e-mail : 1358506549@qq.com
- * date : 2020-01-1615:12
- * desc : 爱好
- * version: 1.0
- */
-public class MarkerHobbyDatum implements Serializable {
- private List singerTop2; // 最喜欢的两位歌手
- private List songTypeTop2; // 最喜欢的两种音乐类型
- private List newsType; // 最喜欢的资讯类型
- private List listenBookTop2; // 最喜欢听的两本书
- private List ifSociety; // 是否喜爱社交
-
-
- public List getSingerTop2() {
- return singerTop2;
- }
-
- public void setSingerTop2(List singerTop2) {
- this.singerTop2 = singerTop2;
- }
-
- public List getSongTypeTop2() {
- return songTypeTop2;
- }
-
- public void setSongTypeTop2(List songTypeTop2) {
- this.songTypeTop2 = songTypeTop2;
- }
-
- public List getNewsType() {
- return newsType;
- }
-
- public void setNewsType(List newsType) {
- this.newsType = newsType;
- }
-
- public List getListenBookTop2() {
- return listenBookTop2;
- }
-
- public void setListenBookTop2(List listenBookTop2) {
- this.listenBookTop2 = listenBookTop2;
- }
-
- public List getIfSociety() {
- return ifSociety;
- }
-
- public void setIfSociety(List ifSociety) {
- this.ifSociety = ifSociety;
- }
-
- @Override
- public String toString() {
- return "MarkerHobbyDatum{" +
- "singerTop2=" + singerTop2 +
- ", songTypeTop2=" + songTypeTop2 +
- ", newsType=" + newsType +
- ", listenBookTop2=" + listenBookTop2 +
- ", ifSociety=" + ifSociety +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java
deleted file mode 100644
index 16158a78c3..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java
+++ /dev/null
@@ -1,61 +0,0 @@
-
-package com.mogo.module.common.entity;
-
-
-import android.text.TextUtils;
-
-import java.io.Serializable;
-
-@SuppressWarnings("unused")
-public class MarkerLocation implements Serializable {
-
- private double lat;//纬度
- private double lon;//经度
- private double angle;//车头角度,可以没有
- private String address;//具体的位置信息
-
- 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 double getAngle() {
- return angle;
- }
-
- public void setAngle(double angle) {
- this.angle = angle;
- }
-
- public String getAddress() {
- if (TextUtils.isEmpty(address)) {
- return "";
- }
- return address;
- }
-
- public void setAddress(String address) {
- this.address = address;
- }
-
- @Override
- public String toString() {
- return "MarkerLocation{" +
- "lat=" + lat +
- ", lon=" + lon +
- ", angle=" + angle +
- ", address='" + address + '\'' +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerNoveltyInfo.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerNoveltyInfo.java
deleted file mode 100644
index bc83bb8531..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerNoveltyInfo.java
+++ /dev/null
@@ -1,195 +0,0 @@
-
-package com.mogo.module.common.entity;
-
-
-/**
- * 新鲜事儿Marker数据
- */
-public class MarkerNoveltyInfo {
- private String type;
- private String sn;
- private MarkerLocation location;
- private String poiType;
- private ContentData contentData;
-
- public ContentData getContentData() {
- return contentData;
- }
-
- public void setContentData(ContentData contentData) {
- this.contentData = contentData;
- }
-
- public MarkerLocation getLocation() {
- return location;
- }
-
- public void setLocation(MarkerLocation location) {
- this.location = location;
- }
-
- public String getPoiType() {
- return poiType;
- }
-
- public void setPoiType(String poiType) {
- this.poiType = poiType;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getSn() {
- return sn;
- }
-
- public void setSn(String sn) {
- this.sn = sn;
- }
-
- public static class ContentData {
- private String content;
- private String iconUrl;
- private String imgUrl;
- private String infoId;
- private long likeNum;
- private String title;
- private String gasPrices;
- private boolean displayNavigation;
- private boolean desplayHost;
- private boolean fabulous;
- private String styleType;
- //上报类型:1-用户上报,2-后台上报 3-三方上报
- private String uploadType;
-
- public String getContent() {
- return content;
- }
-
- public void setContent(String content) {
- this.content = content;
- }
-
- public String getIconUrl() {
- return iconUrl;
- }
-
- public void setIconUrl(String iconUrl) {
- this.iconUrl = iconUrl;
- }
-
- public String getImgUrl() {
- return imgUrl;
- }
-
- public void setImgUrl(String imgUrl) {
- this.imgUrl = imgUrl;
- }
-
- public String getInfoId() {
- return infoId;
- }
-
- public void setInfoId(String infoId) {
- this.infoId = infoId;
- }
-
- public long getLikeNum() {
- return likeNum;
- }
-
- public void setLikeNum(long likeNum) {
- this.likeNum = likeNum;
- }
-
- public String getTitle() {
- return title;
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
-
- public boolean isDisplayNavigation() {
- return displayNavigation;
- }
-
- public void setDisplayNavigation(boolean displayNavigation) {
- this.displayNavigation = displayNavigation;
- }
-
- public String getStyleType() {
- return styleType;
- }
-
- public void setStyleType(String styleType) {
- this.styleType = styleType;
- }
-
- public String getGasPrices() {
- return gasPrices;
- }
-
- public void setGasPrices(String gasPrices) {
- this.gasPrices = gasPrices;
- }
-
- public boolean isDesplayHost() {
- return desplayHost;
- }
-
- public void setDesplayHost(boolean desplayHost) {
- this.desplayHost = desplayHost;
- }
-
- public boolean isFabulous() {
- return fabulous;
- }
-
- public void setFabulous(boolean fabulous) {
- this.fabulous = fabulous;
- }
-
- public String getUploadType() {
- return uploadType;
- }
-
- public void setUploadType(String uploadType) {
- this.uploadType = uploadType;
- }
-
- @Override
- public String toString() {
- return "ContentData{" +
- "content='" + content + '\'' +
- ", iconUrl='" + iconUrl + '\'' +
- ", imgUrl='" + imgUrl + '\'' +
- ", infoId='" + infoId + '\'' +
- ", likeNum=" + likeNum +
- ", title='" + title + '\'' +
- ", gasPrices='" + gasPrices + '\'' +
- ", displayNavigation=" + displayNavigation +
- ", desplayHost=" + desplayHost +
- ", fabulous=" + fabulous +
- ", styleType='" + styleType + '\'' +
- ", uploadType='" + uploadType + '\'' +
- '}';
- }
- }
-
- @Override
- public String toString() {
- return "MarkerNoveltyInfo{" +
- "type='" + type + '\'' +
- ", sn='" + sn + '\'' +
- ", location=" + location +
- ", poiType='" + poiType + '\'' +
- ", contentData=" + contentData +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerOnlineCar.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerOnlineCar.java
deleted file mode 100644
index 5b5ce5a8d7..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerOnlineCar.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package com.mogo.module.common.entity;
-
-import java.io.Serializable;
-import java.util.List;
-
-
-public class MarkerOnlineCar implements Serializable {
-
- private String type;//卡片类型
- private MarkerLocation location;//所在位置
- private Boolean isFocus;//isFocus":"0-未关注,1-关注
- private MarkerUserInfo userInfo;//用户数据
- private MarkerCarInfo carInfo;//车辆数据
- private List pois;//车辆路线
- private MarkerDynamicData dynamicData;//动态数据
- private MarkerHobbyDatum hobbyData;//爱好数据集合
- private List activitiesScope;//活动范围数据集合
- private int compatibility;//匹配度
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public MarkerLocation getLocation() {
- return location;
- }
-
- public void setLocation(MarkerLocation location) {
- this.location = location;
- }
-
- public Boolean getFocus() {
- return isFocus;
- }
-
- public void setFocus(Boolean focus) {
- isFocus = focus;
- }
-
- public MarkerUserInfo getUserInfo() {
- return userInfo;
- }
-
- public void setUserInfo(MarkerUserInfo userInfo) {
- this.userInfo = userInfo;
- }
-
- public MarkerCarInfo getCarInfo() {
- return carInfo;
- }
-
- public void setCarInfo(MarkerCarInfo carInfo) {
- this.carInfo = carInfo;
- }
-
- public List getPois() {
- return pois;
- }
-
- public void setPois(List pois) {
- this.pois = pois;
- }
-
- public MarkerDynamicData getDynamicData() {
- return dynamicData;
- }
-
- public void setDynamicData(MarkerDynamicData dynamicData) {
- this.dynamicData = dynamicData;
- }
-
- public MarkerHobbyDatum getHobbyData() {
- return hobbyData;
- }
-
- public void setHobbyData(MarkerHobbyDatum hobbyData) {
- this.hobbyData = hobbyData;
- }
-
- public List getActivitiesScope() {
- return activitiesScope;
- }
-
- public void setActivitiesScope(List activitiesScope) {
- this.activitiesScope = activitiesScope;
- }
-
- public int getCompatibility() {
- return compatibility;
- }
-
- public void setCompatibility(int compatibility) {
- this.compatibility = compatibility;
- }
-
- @Override
- public String toString() {
- return "MarkerOnlineCar{" + "type='" + type + '\'' + ", location=" + location + ", " +
- "isFocus=" + isFocus + ", userInfo=" + userInfo + ", carInfo=" + carInfo + ", " + "pois=" + pois + ", dynamicData=" + dynamicData + ", hobbyData=" + hobbyData + "," + " activitiesScope=" + activitiesScope + ", compatibility=" + compatibility + '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerOnlineTag.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerOnlineTag.java
deleted file mode 100644
index 00f2e6377c..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerOnlineTag.java
+++ /dev/null
@@ -1,41 +0,0 @@
-
-package com.mogo.module.common.entity;
-
-
-import android.text.TextUtils;
-
-import java.io.Serializable;
-
-@SuppressWarnings("unused")
-public class MarkerOnlineTag implements Serializable {
-
- private String content;
- private boolean isCheck;
-
- public String getContent() {
- if (TextUtils.isEmpty(content)) {
- return "";
- }
- return content;
- }
-
- public void setContent(String content) {
- this.content = content;
- }
-
- public boolean getIsCheck() {
- return isCheck;
- }
-
- public void setIsCheck(boolean isCheck) {
- this.isCheck = isCheck;
- }
-
- @Override
- public String toString() {
- return "MarkerHobbyDatum{" +
- "content='" + content + '\'' +
- ", isCheck=" + isCheck +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShareMusic.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShareMusic.java
deleted file mode 100644
index 96eedf67e8..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShareMusic.java
+++ /dev/null
@@ -1,155 +0,0 @@
-
-package com.mogo.module.common.entity;
-
-
-import android.text.TextUtils;
-
-import java.io.Serializable;
-
-@SuppressWarnings("unused")
-public class MarkerShareMusic implements Serializable {
-
- private String bookInfo;
- private int id;
- private int likeNumber;
- private MarkerLocation location;
- private String mediaId;
- private String mediaImg;
- private String mediaName;
- private String mediaSinger;
- private String mediaUrl;
- private String shareContentText;
- private int shareType;
- private String type;
- private MarkerUserInfo userInfo;
-
- public String getBookInfo() {
- return bookInfo;
- }
-
- public void setBookInfo(String bookInfo) {
- this.bookInfo = bookInfo;
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public int getLikeNumber() {
- return likeNumber;
- }
-
- public void setLikeNumber(int likeNumber) {
- this.likeNumber = likeNumber;
- }
-
- public String getMediaId() {
- return mediaId;
- }
-
- public void setMediaId(String mediaId) {
- this.mediaId = mediaId;
- }
-
- public String getMediaImg() {
- if (TextUtils.isEmpty(mediaImg)) {
- return "";
- }
- return mediaImg;
- }
-
- public void setMediaImg(String mediaImg) {
- this.mediaImg = mediaImg;
- }
-
- public String getMediaName() {
- if (TextUtils.isEmpty(mediaName)) {
- return "";
- }
- return mediaName;
- }
-
- public void setMediaName(String mediaName) {
- this.mediaName = mediaName;
- }
-
- public String getMediaSinger() {
- return mediaSinger;
- }
-
- public void setMediaSinger(String mediaSinger) {
- this.mediaSinger = mediaSinger;
- }
-
- public String getMediaUrl() {
- return mediaUrl;
- }
-
- public void setMediaUrl(String mediaUrl) {
- this.mediaUrl = mediaUrl;
- }
-
- public String getShareContentText() {
- return shareContentText;
- }
-
- public void setShareContentText(String shareContentText) {
- this.shareContentText = shareContentText;
- }
-
- public int getShareType() {
- return shareType;
- }
-
- public void setShareType(int shareType) {
- this.shareType = shareType;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public MarkerUserInfo getUserInfo() {
- return userInfo;
- }
-
- public void setUserInfo(MarkerUserInfo userInfo) {
- this.userInfo = userInfo;
- }
-
- public MarkerLocation getLocation() {
- return location;
- }
-
- public void setLocation(MarkerLocation location) {
- this.location = location;
- }
-
-
- @Override
- public String toString() {
- return "MarkerShareMusic{" +
- "bookInfo='" + bookInfo + '\'' +
- ", id=" + id +
- ", likeNumber=" + likeNumber +
- ", location=" + location +
- ", mediaId='" + mediaId + '\'' +
- ", mediaImg='" + mediaImg + '\'' +
- ", mediaName='" + mediaName + '\'' +
- ", mediaSinger='" + mediaSinger + '\'' +
- ", mediaUrl='" + mediaUrl + '\'' +
- ", shareContentText='" + shareContentText + '\'' +
- ", shareType=" + shareType +
- ", type='" + type + '\'' +
- ", userInfo=" + userInfo +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShowEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShowEntity.java
deleted file mode 100644
index 69b2df5411..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerShowEntity.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package com.mogo.module.common.entity;
-
-import android.text.TextUtils;
-
-import com.mogo.map.marker.IMogoMarker;
-
-import java.lang.ref.WeakReference;
-import java.util.Objects;
-
-/**
- * author : donghongyu
- * e-mail : 1358506549@qq.com
- * date : 2020-01-1015:47
- * desc : 用来跟Marker View 绑定使用,内容、状态等设置
- * version: 1.0
- */
-public class MarkerShowEntity {
-
- // false - 没选中,true - 选中
- private boolean isChecked;
- // false - 非高亮,true - 高亮
- private boolean isHighlighted;
- // icon 地址,例如:头像,唱片图片,探路缩略,可能为空展示默认图
- private String iconUrl;
- // 要展示的文本
- private String textContent;
- // Marker 类型
- private String markerType;
- // 绑定 MarkerView 的数据
- private Object bindObj;
- //Marker 经纬度位置信息
- private MarkerLocation markerLocation;
- private IMogoMarker mMarker;
-
- public boolean isChecked() {
- return isChecked;
- }
-
- public void setChecked(boolean checked) {
- isChecked = checked;
- }
-
- public boolean isHighlighted() {
- return isHighlighted;
- }
-
- public void setHighlighted(boolean highlighted) {
- isHighlighted = highlighted;
- }
-
- public String getIconUrl() {
- return iconUrl;
- }
-
- public void setIconUrl(String iconUrl) {
- this.iconUrl = iconUrl;
- }
-
- public String getTextContent() {
- if (TextUtils.isEmpty(textContent)) {
- return "";
- }
- return textContent;
- }
-
- public void setTextContent(String textContent) {
- this.textContent = textContent;
- }
-
- public String getMarkerType() {
- return markerType;
- }
-
- public void setMarkerType(String markerType) {
- this.markerType = markerType;
- }
-
- public Object getBindObj() {
- return bindObj;
- }
-
- public void setBindObj(Object bindObj) {
- this.bindObj = bindObj;
- }
-
- public MarkerLocation getMarkerLocation() {
- return markerLocation;
- }
-
- public void setMarkerLocation(MarkerLocation markerLocation) {
- this.markerLocation = markerLocation;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- MarkerShowEntity that = (MarkerShowEntity) o;
- return Objects.equals(iconUrl, that.iconUrl) &&
- Objects.equals(textContent, that.textContent) &&
- Objects.equals(markerType, that.markerType) &&
- Objects.equals(bindObj, that.bindObj) &&
- Objects.equals(markerLocation, that.markerLocation);
- }
-
- public void setMarker( IMogoMarker marker ) {
- this.mMarker = marker;
- }
-
- public IMogoMarker getMarker() {
- return mMarker;
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(iconUrl, textContent, markerType, bindObj, markerLocation);
- }
-
- @Override
- public String toString() {
- return "MarkerShowEntity{" +
- "isChecked=" + isChecked +
- ", isHighlighted=" + isHighlighted +
- ", iconUrl='" + iconUrl + '\'' +
- ", textContent='" + textContent + '\'' +
- ", markerType='" + markerType + '\'' +
- ", bindObj=" + bindObj +
- ", markerLocation=" + markerLocation +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerUserInfo.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerUserInfo.java
deleted file mode 100644
index 70c0f7f2c5..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerUserInfo.java
+++ /dev/null
@@ -1,208 +0,0 @@
-
-package com.mogo.module.common.entity;
-
-import android.text.TextUtils;
-
-import java.io.Serializable;
-import java.util.Calendar;
-
-@SuppressWarnings("unused")
-public class MarkerUserInfo implements Serializable {
-
- private String sn;
- private long userId;
- private String userName;//用户昵称
- private String userHead;//用户头像
- private String gender;//gender": "男|女|无(也可以0|1|2根据实际库存返回即可)
- private Integer age;// 年龄段,可以为空,与车聊聊一致
-
- // TODO V2X临时字段,接口出好后进行修改
- private String lastActiveweekAvgscore;//末次活跃周驾驶行为平均得分
- private String safeLabel;//车辆安全标签
- private int safeLabelType;//1老司机 2安全驾驶 3危险驾驶
-
- public void setAge(Integer age) {
- this.age = age;
- }
-
- public int getAgeNumber() {
- if (age != null) {
- return age;
- }
- return -1;
- }
-
- public String getAge() {
- try {
- if (getAgeNumber() >= 0) {
-
- Calendar cal = Calendar.getInstance();
- int year = cal.get(Calendar.YEAR);
-
- //2020-30=1990
- double ageDiffer = year - getAgeNumber();
- String ageStr = "" + ageDiffer;
- char[] ageChars = ageStr.toCharArray();
-
- //1990
- char ageChar = ageChars[2];
-
- String ageString = "未设置";
-
- switch (ageChar) {
- case '0':
- ageString = "00后";
- break;
- case '1':
- ageString = "10后";
- break;
- case '2':
- ageString = "20后";
- break;
- case '3':
- ageString = "30后";
- break;
- case '4':
- ageString = "40后";
- break;
- case '5':
- ageString = "50后";
- break;
- case '6':
- ageString = "60后";
- break;
- case '7':
- ageString = "70后";
- break;
- case '8':
- ageString = "80后";
- break;
- case '9':
- ageString = "90后";
- break;
- }
-
- return ageString;
- } else {
- return "";
- }
- } catch (Exception e) {
- e.printStackTrace();
- return "";
- }
- }
-
- public int getGenderValue() {
- if (!TextUtils.isEmpty(gender)) {
- if ("男".equals(gender)) {
- return 0;
- }
- return 1;
- } else {
- return 0;
- }
- }
-
- public String getGender() {
- if (TextUtils.isEmpty(gender)) {
- return "未设置";
- }
- return gender;
- }
-
- public void setGender(String gender) {
- this.gender = gender;
- }
-
- public void setGender(int gender) {
- if (gender == 0) {
- this.gender = "男";
- } else {
- this.gender = "女";
- }
- }
-
- public String getSn() {
- if (TextUtils.isEmpty(sn)) {
- return "";
- }
- return sn;
- }
-
- public void setSn(String sn) {
- this.sn = sn;
- }
-
- public String getUserHead() {
- if (TextUtils.isEmpty(userHead)) {
- return "";
- }
- return userHead;
- }
-
- public void setUserHead(String userHead) {
- this.userHead = userHead;
- }
-
- public Long getUserId() {
- return userId;
- }
-
- public void setUserId(Long userId) {
- this.userId = userId;
- }
-
- public String getUserName() {
- if (TextUtils.isEmpty(userName)) {
- return "用户未设置昵称";
- }
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public void setUserId(long userId) {
- this.userId = userId;
- }
-
- public String getLastActiveweekAvgscore() {
- return lastActiveweekAvgscore;
- }
-
- public void setLastActiveweekAvgscore(String lastActiveweekAvgscore) {
- this.lastActiveweekAvgscore = lastActiveweekAvgscore;
- }
-
- public String getSafeLabel() {
- return safeLabel;
- }
-
- public void setSafeLabel(String safeLabel) {
- this.safeLabel = safeLabel;
- }
-
- public int getSafeLabelType() {
- return safeLabelType;
- }
-
- public void setSafeLabelType(int safeLabelType) {
- this.safeLabelType = safeLabelType;
- }
-
- @Override
- public String toString() {
- return "MarkerUserInfo{" +
- "sn='" + sn + '\'' +
- ", userId=" + userId +
- ", userName='" + userName + '\'' +
- ", userHead='" + userHead + '\'' +
- ", gender='" + gender + '\'' +
- ", age=" + age +
- ", lastActiveweekAvgscore='" + lastActiveweekAvgscore + '\'' +
- ", safeLabel='" + safeLabel + '\'' +
- ", safeLabelType=" + safeLabelType +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XEventZanData.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XEventZanData.java
deleted file mode 100644
index 0301db0b9a..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XEventZanData.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.mogo.module.common.entity;
-
-import com.mogo.utils.sqlite.annotation.DbDatabase;
-import com.mogo.utils.sqlite.annotation.DbField;
-import com.mogo.utils.sqlite.annotation.DbTable;
-
-/**
- * V2X 被点赞的事件
- *
- * @author donghongyu
- */
-@DbDatabase(dbName = "MoGoScenario.db")
-@DbTable(tableName = "tb_event_zan")
-public class V2XEventZanData {
-
- /**
- * 事件ID
- */
- @DbField(fieldName = "eventId")
- public String eventId;
-
- /**
- * 触发时间
- */
- @DbField(fieldName = "triggerTime")
- public Long triggerTime;
-
- public String getEventId() {
- return eventId;
- }
-
- public void setEventId(String eventId) {
- this.eventId = eventId;
- }
-
- public Long getTriggerTime() {
- return triggerTime;
- }
-
- public void setTriggerTime(Long triggerTime) {
- this.triggerTime = triggerTime;
- }
-
- @Override
- public String toString() {
- return "V2XEventZanData{" +
- "eventId=" + eventId +
- ", triggerTime=" + triggerTime +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XHistoryScenarioData.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XHistoryScenarioData.java
deleted file mode 100644
index 23a176a04d..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XHistoryScenarioData.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.mogo.module.common.entity;
-
-import com.mogo.module.common.constants.RoomConstants;
-import com.mogo.utils.sqlite.annotation.DbDatabase;
-import com.mogo.utils.sqlite.annotation.DbField;
-import com.mogo.utils.sqlite.annotation.DbTable;
-
-/**
- * V2X 道路历史事件
- *
- * @author donghongyu
- */
-@DbDatabase(dbName = RoomConstants.DB_NAME_V2X)
-@DbTable(tableName = RoomConstants.TB_NAME_SCENARIO)
-public class V2XHistoryScenarioData {
-
- /**
- * 事件类型
- */
- @DbField(fieldName = "scenarioType")
- public Integer scenarioType;
-
- /**
- * 事件触发时间
- */
- @DbField(fieldName = "triggerTime")
- public Long triggerTime;
-
- /**
- * 事件json
- */
- @DbField(fieldName = "eventJsonData")
- public String eventJsonData;
-
- /**
- * 事件json HashCode
- * 只取json中的几个代表性字段,表示唯一性,因为图片地址会经常被改变
- */
- @DbField(fieldName = "eventJsonDataHashCode")
- public Integer eventJsonDataHashCode;
-
- /**
- * 事件是否被处理过了,true-处理过了。false-未处理过
- */
- @DbField(fieldName = "isDispose")
- public Boolean isDispose;
-
- public Integer getScenarioType() {
- return scenarioType;
- }
-
- public void setScenarioType(Integer scenarioType) {
- this.scenarioType = scenarioType;
- }
-
- public String getEventJsonData() {
- return eventJsonData;
- }
-
- public void setEventJsonData(String eventJsonData) {
- this.eventJsonData = eventJsonData;
- }
-
- public Long getTriggerTime() {
- return triggerTime;
- }
-
- public void setTriggerTime(Long triggerTime) {
- this.triggerTime = triggerTime;
- }
-
- public Boolean isDispose() {
- return isDispose;
- }
-
- public void setDispose(Boolean dispose) {
- isDispose = dispose;
- }
-
- public Integer getEventJsonDataHashCode() {
- return eventJsonDataHashCode;
- }
-
- public void setEventJsonDataHashCode(Integer eventJsonDataHashCode) {
- this.eventJsonDataHashCode = eventJsonDataHashCode;
- }
-
- @Override
- public V2XHistoryScenarioData clone() {
- try {
- return (V2XHistoryScenarioData) super.clone();
- } catch (CloneNotSupportedException e) {
- e.printStackTrace();
- }
- return this;
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XLiveCarInfoEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XLiveCarInfoEntity.java
deleted file mode 100644
index 94af904dc0..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XLiveCarInfoEntity.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.mogo.module.common.entity;
-
-import java.util.Objects;
-
-/**
- * 可直播车机基本信息,再通过 appDataService/integratedServices/app/push/no/livePush/v1
- * 获取直播信息
- * @author donghongyu
- */
-public class V2XLiveCarInfoEntity {
- private String sn;
- private double lon;
- private double lat;
-
- public String getSn() {
- return sn;
- }
-
- public void setSn(String sn) {
- this.sn = sn;
- }
-
- public double getLon() {
- return lon;
- }
-
- public void setLon(double lon) {
- this.lon = lon;
- }
-
- public double getLat() {
- return lat;
- }
-
- public void setLat(double lat) {
- this.lat = lat;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- V2XLiveCarInfoEntity that = (V2XLiveCarInfoEntity) o;
- return Double.compare(that.lon, lon) == 0 &&
- Double.compare(that.lat, lat) == 0 &&
- Objects.equals(sn, that.sn);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(sn, lon, lat);
- }
-
- @Override
- public String toString() {
- return "V2XLiveCarEntity{" +
- "sn='" + sn + '\'' +
- ", lon=" + lon +
- ", lat=" + lat +
- '}';
- }
-}
\ No newline at end of file
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XMessageEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XMessageEntity.java
deleted file mode 100644
index 98a0129bda..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XMessageEntity.java
+++ /dev/null
@@ -1,212 +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.Objects;
-
-/**
- * e-mail : 1358506549@qq.com
- * date : 2020/5/15 4:35 PM
- * desc : V2X 场景消息聚合
- * version: 1.0
- *
- * @author donghongyu
- */
-public class V2XMessageEntity implements Serializable {
-
- /**
- * 场景类型
- *
- * @see V2XTypeEnum
- */
- @MessageType
- int type;
-
- /**
- * 是否展示对话框
- * true-展示,false-不展示
- */
- boolean showState;
-
- /**
- * 是否需要判断重复事件
- * true-判断,false-不判断
- * 默认需要判断
- */
- boolean isNeedCompareSameScenario = true;
-
- //是否播报tts
- private boolean onlyShow = false;
-
- //本机与事件是否连线
- private boolean needAddLine = true;
-
- /**
- * 场景具体的数据内容
- */
- T content;
-
- public int getType() {
- return type;
- }
-
- public void setType(@MessageType int type) {
- this.type = type;
- }
-
- public boolean isShowState() {
- return showState;
- }
-
- public void setShowState(boolean showState) {
- this.showState = showState;
- }
-
- public boolean isNeedCompareSameScenario() {
- return isNeedCompareSameScenario;
- }
-
- public void setNeedCompareSameScenario(boolean needCompareSameScenario) {
- isNeedCompareSameScenario = needCompareSameScenario;
- }
-
- public T getContent() {
- return content;
- }
-
- public void setContent(T content) {
- this.content = content;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- V2XMessageEntity> that = (V2XMessageEntity>) o;
- return type == that.type &&
- content.equals(that.content);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(type, content);
- }
-
- public boolean isOnlyShow() {
- return onlyShow;
- }
-
- public void setOnlyShow(boolean onlyShow) {
- this.onlyShow = onlyShow;
- }
-
- public boolean isNeedAddLine() {
- return needAddLine;
- }
-
- public void setNeedAddLine(boolean needAddLine) {
- this.needAddLine = needAddLine;
- }
-
- /**
- * V2X 场景类型
- */
- public interface V2XTypeEnum {
- // 默认展示详情
- int DEFAULT_WINDOW = 0;
- // 道路事件预警
- int ALERT_ROAD_WARNING = 1_000;
- // 他车求助预警
- int ALERT_SEEK_WARNING = 1_001;
- // 疲劳驾驶预警
- int ALERT_FATIGUE_DRIVING = 1_002;
- // 后台推送展示 Window
- int ALERT_PUSH_WINDOW_WARNING = 1_003;
- // 后台推送展示 Toast
- int ALERT_PUSH_TOAST_WARNING = 1_004;
- // 后台推送展示 展示的直播
- int ALERT_PUSH_LIVE_CAR_WARNING = 1_005;
- // V2X场景动画展示
- int ALERT_ANIMATION_WARNING = 1_006;
- // 道路事件直播预警
- int ALERT_ROAD_LIVE_CAR_WARNING = 1_007;
- // 道路事件违章停车
- int ALERT_ILLEGAL_PARK_WARNING = 1_008;
- // 用户UGC反馈事件准确性弹窗
- int ALERT_EVENT_UGC_WARNING = 1_009;
- // 呼叫、请求直播事件
- int ALERT_VOICE_CALL_FOR_LIVECAR_SHOW = 1_010;
- // 基于预判目的地道路事件的路线推荐
- int ALERT_RECOMMEND_ROUTE = 1_011;
- // 基于预判目的地违章高发停车场推荐
- int ALERT_RECOMMEND_PARKING = 1_012;
- // 弱势交通参与者401018
- int ALERT_THE_FRONT_WEAKNESS = 40_1018;
- // 关闭红色边框预警
- int ALERT_THE_FRONT_CRASH_WARNING_NON = 0;
- // 前方行人碰撞预警
- int ALERT_THE_FRONT_CRASH_WARNING_TOP = 1;
- // 后方碰撞预警
- int ALERT_THE_FRONT_CRASH_WARNING_BOTTOM = 2;
- // 左前方碰撞预警
- int ALERT_THE_FRONT_CRASH_WARNING_LEFT = 3;
- // 右前方碰撞预警
- int ALERT_THE_FRONT_CRASH_WARNING_RIGHT = 4;
- // 左后方碰撞预警
- int ALERT_THE_FRONT_CRASH_WARNING_BOTTOM_LEFT = 5;
- // 右后方碰撞预警
- int ALERT_THE_FRONT_CRASH_WARNING_BOTTOM_RIGHT = 6;
-
- // 推送VR消息展示
- int ALERT_PUSH_VR_SHOW = 2_000;
- // 自车求助
- int ALERT_CAR_FOR_HELP = 8_000;
- // obu事件
- int ALERT_OBU_EVENT = 9_000;
- }
-
- @IntDef(value = {
- V2XTypeEnum.ALERT_ROAD_WARNING,
- V2XTypeEnum.ALERT_SEEK_WARNING,
- V2XTypeEnum.ALERT_FATIGUE_DRIVING,
- V2XTypeEnum.ALERT_PUSH_WINDOW_WARNING,
- V2XTypeEnum.ALERT_PUSH_TOAST_WARNING,
- V2XTypeEnum.ALERT_PUSH_LIVE_CAR_WARNING,
- V2XTypeEnum.ALERT_ANIMATION_WARNING,
- V2XTypeEnum.ALERT_ROAD_LIVE_CAR_WARNING,
- V2XTypeEnum.ALERT_ILLEGAL_PARK_WARNING,
- V2XTypeEnum.ALERT_EVENT_UGC_WARNING,
- V2XTypeEnum.ALERT_CAR_FOR_HELP,
- V2XTypeEnum.ALERT_VOICE_CALL_FOR_LIVECAR_SHOW,
- V2XTypeEnum.ALERT_RECOMMEND_ROUTE,
- V2XTypeEnum.ALERT_RECOMMEND_PARKING,
- V2XTypeEnum.ALERT_PUSH_VR_SHOW,
- V2XTypeEnum.ALERT_OBU_EVENT,
- V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS,
- })
- @Target({
- ElementType.PARAMETER,
- ElementType.FIELD,
- ElementType.METHOD,
- }) //表示注解作用范围,参数注解,成员注解,方法注解
- @Retention(RetentionPolicy.SOURCE) //表示注解所存活的时间,在运行时,而不会存在 .class 文件中
- public @interface MessageType { //接口,定义新的注解类型
- }
-
- @Override
- public String toString() {
- return "V2XMessageEntity{" +
- "type=" + type +
- ", showState=" + showState +
- ", isNeedCompareSameScenario=" + isNeedCompareSameScenario +
- ", onlyShow=" + onlyShow +
- ", needAddLine=" + needAddLine +
- ", content=" + content +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XRoadEventEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XRoadEventEntity.java
deleted file mode 100644
index 9e0de3ca6c..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XRoadEventEntity.java
+++ /dev/null
@@ -1,173 +0,0 @@
-package com.mogo.module.common.entity;
-
-import android.text.TextUtils;
-
-import com.mogo.module.common.enums.EventTypeEnum;
-
-import java.io.Serializable;
-import java.util.Objects;
-
-/**
- * author : donghongyu
- * e-mail : 1358506549@qq.com
- * date : 2020/4/13 11:17 AM
- * desc : 道路事件的聚合,位置、详情,用于V2X情况下展示
- * version: 1.0
- */
-public class V2XRoadEventEntity implements Serializable {
- /**
- * @see EventTypeEnum
- */
- // 事件类型
- private String poiType;
- // 事件位置
- private MarkerLocation location;
- // 具体的信息
- private MarkerExploreWay noveltyInfo;
- // tts 提示
- private String tts;
-
- // ADAS 展示文案
- private String alarmContent;
- // 距离当前车辆的距离
- private double distance;
- // 默认展示时间
- private int expireTime;
- // 展示Button
- private boolean isShowEventButton;
- // 绑定 MarkerView 的数据, 业务需要啥数据就传入啥数据
- private Object bindObj;
-
- public MarkerLocation getLocation() {
- return location;
- }
-
- public void setLocation(MarkerLocation location) {
- this.location = location;
- }
-
- public String getPoiType() {
- if (TextUtils.isEmpty(poiType)) {
- return "";
- }
- return poiType;
- }
-
- public void setPoiType(String poiType) {
- this.poiType = poiType;
- }
-
- public String getTts(boolean haveLiveCar) {
- if (EventTypeEnum.GHOST_PROBE.getPoiType().equals(poiType)) {
- tts = EventTypeEnum.GHOST_PROBE.getTts();
- return tts;
- }
- tts = "前方#" + (int) getDistance() + "米#";
- tts += EventTypeEnum.getTts(getPoiType());
- if (haveLiveCar) {
- tts += ",查看实况请说确定。";
- setShowEventButton(true);
- } else {
- tts += ",请注意躲避。";
- setShowEventButton(false);
- }
- return tts;
- }
-
- /**
- * 检测到附近#道路施工#,确认该信息是否正确?您可以说“正确”或“错误”帮助其他车友。
- */
- public String getTtsWithFeedback() {
- tts = "检测到附近";
- tts += EventTypeEnum.getTtsWithFeedback(getPoiType());
- tts += ",确认该信息是否正确?您可以说“正确”或“错误”帮助其他车友。";
- return tts;
- }
-
- public String getTts() {
- return tts;
- }
-
- public void setTts(String tts) {
- this.tts = tts;
- }
-
- public boolean isShowEventButton() {
- return isShowEventButton;
- }
-
- public void setShowEventButton(boolean showEventButton) {
- isShowEventButton = showEventButton;
- }
-
- public String getAlarmContent() {
- alarmContent = EventTypeEnum.getAlarmContent(getPoiType());
- return alarmContent;
- }
-
- public void setAlarmContent(String alarmContent) {
- this.alarmContent = alarmContent;
- }
-
- public double getDistance() {
- return distance;
- }
-
- public void setDistance(double distance) {
- this.distance = distance;
- }
-
- public int getExpireTime() {
- return expireTime;
- }
-
- public void setExpireTime(int expireTime) {
- this.expireTime = expireTime;
- }
-
- public MarkerExploreWay getNoveltyInfo() {
- return noveltyInfo;
- }
-
- public void setNoveltyInfo(MarkerExploreWay noveltyInfo) {
- this.noveltyInfo = noveltyInfo;
- }
-
- public Object getBindObj() {
- return bindObj;
- }
-
- public void setBindObj(Object bindObj) {
- this.bindObj = bindObj;
- }
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- V2XRoadEventEntity that = (V2XRoadEventEntity) o;
- return Objects.equals(noveltyInfo.getInfoId(), that.noveltyInfo.getInfoId()) &&
- Objects.equals(poiType, that.poiType);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(poiType, noveltyInfo.getInfoId());
- }
-
- @Override
- public String toString() {
- return "V2XRoadEventEntity{" +
- "poiType='" + poiType + '\'' +
- ", location=" + location +
- ", noveltyInfo=" + noveltyInfo +
- ", tts='" + tts + '\'' +
- ", alarmContent='" + alarmContent + '\'' +
- ", distance=" + distance +
- ", expireTime=" + expireTime +
- ", isShowEventButton=" + isShowEventButton +
- ", bindObj=" + bindObj +
- '}';
- }
-}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java
deleted file mode 100644
index 9773232763..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java
+++ /dev/null
@@ -1,268 +0,0 @@
-package com.mogo.module.common.entity;
-
-import com.mogo.eagle.core.data.map.MogoLatLng;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * @author liujing
- * @description 预警目标物数据模型
- * @since: 2021/3/26
- */
-public class V2XWarningEntity implements Serializable {
-
- //事件类型 行人1/自行车2/摩托车4/骑行车辆11
- private int type;
- //目标物位置
- private double lat;
- private double lon;
- //目标物颜色
- public String targetColor;
- //目标物距离
- private double distance;
- //预测碰撞点位置
- private double collisionLat;
- private double collisionLon;
- //朝向 角度
- private double angle;
- //方位 前 后 左 右
- private int direction;
- //速度
- private float speed;
- //停止线经纬度
- private List stopLines;
- //自车到停止线距离
- private double stopLineDistance;
- //道路唯一标识
- public String roadId;
- //车道唯一标识
- public String laneId;
- //识别物体唯一标识
- public String uuid;
- //红绿灯颜色
- public String color;
- //车ID 暂不使用
- public String carId;
- //预警文案
- private String warningContent;
- //车头朝向
- public double heading;
- //系统时间 暂时没用
- public long systemTime;
- //定位卫星时间 暂时没用
- public long satelliteTime;
- //预警蒙层等展示时长
- private long showTime;
- //设计划线宽度与道路同宽
- private float roadwidth;
-
- //自组字段
- //tts播报
- private String tts;
- //自车位置
- private MogoLatLng carLocation;
-
- public MogoLatLng getCarLocation() {
- return carLocation;
- }
-
- public void setTts(int type) {
- switch (type) {
- case 1:
- case 11:
- this.tts = "注意行人";
- break;
- case 2:
- this.tts = "注意自行车";
- break;
- case 4:
- this.tts = "注意摩托车";
- break;
- default:
- break;
- }
- }
-
- public void setType(int type) {
- this.type = type;
- }
-
- public void setDistance(double distance) {
- this.distance = distance;
- }
-
- public void setLat(double lat) {
- this.lat = lat;
- }
-
- public void setLon(double lon) {
- this.lon = lon;
- }
-
- public void setCollisionLat(double collisionLat) {
- this.collisionLat = collisionLat;
- }
-
- public void setCollisionLon(double collisionLon) {
- this.collisionLon = collisionLon;
- }
-
- public void setAngle(double angle) {
- this.angle = angle;
- }
-
- public void setDirection(int direction) {
- this.direction = direction;
- }
-
- public void setTts(String tts) {
- this.tts = tts;
- }
-
- public void setSpeed(float speed) {
- this.speed = speed;
- }
-
- public long getShowTime() {
- return showTime;
- }
-
- public void setShowTime(long showTime) {
- this.showTime = showTime;
- }
-
-
- public void setStopLineDistance(double stopLineDistance) {
- this.stopLineDistance = stopLineDistance;
- }
-
- public void setWarningContent(String warningContent) {
- this.warningContent = warningContent;
- }
-
- public void setStopLines(List stopLines) {
- this.stopLines = stopLines;
- }
-
- public void setCarLocation(MogoLatLng carLocation) {
- this.carLocation = carLocation;
- }
-
- public int getType() {
- return type;
- }
-
- public double getLat() {
- return lat;
- }
-
- public double getLon() {
- return lon;
- }
-
- public double getCollisionLat() {
- return collisionLat;
- }
-
- public double getCollisionLon() {
- return collisionLon;
- }
-
- public double getDistance() {
- return distance;
- }
-
- public double getAngle() {
- return angle;
- }
-
- public int getDirection() {
- return direction;
- }
-
- public float getSpeed() {
- return speed;
- }
-
- public String getUuid() {
- return uuid;
- }
-
- public String getColor() {
- return color;
- }
-
- public String getWarningContent() {
- return warningContent;
- }
-
- public double getHeading() {
- return heading;
- }
-
- public long getSystemTime() {
- return systemTime;
- }
-
- public long getSatelliteTime() {
- return satelliteTime;
- }
-
-
- public String getTts() {
- if (warningContent == null) {
- setTts(type);
- return tts;
- }
- return warningContent;
- }
-
- public double getStopLineDistance() {
- return stopLineDistance;
- }
-
- public List getStopLines() {
- return stopLines;
- }
-
- public float getRoadwidth() {
- return roadwidth;
- }
-
- public void setRoadwidth(float roadwidth) {
- this.roadwidth = roadwidth;
- }
-
- @Override
- public String toString() {
- return "V2XWarningEntity{" +
- "type=" + type +
- ", lat=" + lat +
- ", lon=" + lon +
- ", targetColor='" + targetColor + '\'' +
- ", distance=" + distance +
- ", collisionLat=" + collisionLat +
- ", collisionLon=" + collisionLon +
- ", angle=" + angle +
- ", direction=" + direction +
- ", speed=" + speed +
- ", stopLines=" + stopLines +
- ", stopLineDistance=" + stopLineDistance +
- ", roadId='" + roadId + '\'' +
- ", laneId='" + laneId + '\'' +
- ", uuid='" + uuid + '\'' +
- ", color='" + color + '\'' +
- ", carId='" + carId + '\'' +
- ", warningContent='" + warningContent + '\'' +
- ", heading=" + heading +
- ", systemTime=" + systemTime +
- ", satelliteTime=" + satelliteTime +
- ", showTime=" + showTime +
- ", roadwidth=" + roadwidth +
- ", tts='" + tts + '\'' +
- ", carLocation=" + carLocation +
- '}';
- }
-}
-
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/CloudPoiManager.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/CloudPoiManager.java
index c065a00369..dddf345503 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/CloudPoiManager.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/utils/CloudPoiManager.java
@@ -8,7 +8,7 @@ import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.module.common.R;
-import com.mogo.module.common.enums.EventTypeEnum;
+import com.mogo.eagle.core.data.enums.EventTypeEnum;
import com.mogo.module.common.marker.PoiWrapper;
import java.util.List;
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/view/NetworkLoadingView.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/view/NetworkLoadingView.java
deleted file mode 100644
index 7a8fad2cf0..0000000000
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/view/NetworkLoadingView.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.mogo.module.common.view;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.Button;
-import android.widget.ProgressBar;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-
-import androidx.annotation.Nullable;
-
-import com.mogo.module.common.R;
-import com.mogo.module.common.animation.AnimationResources;
-import com.mogo.module.common.animation.AnimationManager;
-
-public class NetworkLoadingView extends RelativeLayout {
-
- private ProgressBar loadView;
- private TextView textView;
- private AnimationManager mAnimationManager;
- public Button refresButton;
- private String loadingText = "正在获取信息…";
-
- public NetworkLoadingView(Context context) {
-
- super(context);
- }
-
- public NetworkLoadingView(Context context, @Nullable AttributeSet attrs) {
- super(context, attrs);
- LayoutInflater.from(context).inflate(R.layout.network_loading_item, this);
- initView();
- /*
- 添加动画图片资源
- * */
- setLoadingImage(AnimationResources.loadingRes);
- }
-
- public NetworkLoadingView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
- super(context, attrs, defStyleAttr);
- }
-
- public void initView() {
- mAnimationManager = new AnimationManager();
- loadView = findViewById(R.id.loading_imageview);
- textView = findViewById(R.id.loading_text);
- refresButton = findViewById(R.id.refresh_button);
- }
-
- public void setLoadingText(String text) {
- if (textView != null) {
- textView.setText(text);
- }
- }
-
- public void setLoadingImage(int[] resources) {
- mAnimationManager.animationWithTarget(loadView, resources, 100);
- }
-
- public void start() {
- if (mAnimationManager != null) {
- mAnimationManager.start();
- this.setVisibility(View.VISIBLE);
- }
- if (refresButton != null) {
- refresButton.setVisibility(GONE);
- }
- if (textView != null) {
- textView.setText(loadingText);
- }
- }
-
- public void stop() {
- if (mAnimationManager != null) {
- mAnimationManager.stop();
- this.setVisibility(GONE);
- }
- }
-
- public void stopWithError(String errormsg, int showRefreshButton) {
- if (mAnimationManager != null) {
- mAnimationManager.soptWithError();
- }
- if (textView != null) {
- textView.setText(errormsg);
- }
- if (refresButton != null) {
- refresButton.setVisibility(showRefreshButton);
- }
-
- }
-
-
-}
diff --git a/modules/mogo-module-common/src/main/res/layout/network_loading_item.xml b/modules/mogo-module-common/src/main/res/layout/network_loading_item.xml
deleted file mode 100644
index e16c269062..0000000000
--- a/modules/mogo-module-common/src/main/res/layout/network_loading_item.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/mogo-module-service/consumer-rules.pro b/modules/mogo-module-service/consumer-rules.pro
index 907ff0ef07..bf844e9314 100644
--- a/modules/mogo-module-service/consumer-rules.pro
+++ b/modules/mogo-module-service/consumer-rules.pro
@@ -1,12 +1,7 @@
#-----ServiceModule-----
-keep class com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo{*;}
--keep class com.mogo.module.service.launchercard.LauncherCardRefreshType{*;}
-keep class com.mogo.module.service.network.bean.*{*;}
-keep class com.mogo.module.service.network.RefreshBody{*;}
--keep class com.mogo.module.service.onlinecar.panel.NavigationTargetInfo{*;}
--keep class com.mogo.module.service.onlinecar.panel.OnlineCarStrategy{*;}
-keep class com.mogo.module.service.websocket.*{*;}
--keep interface com.mogo.module.service.intent.IntentHandler{*;}
-keep interface com.mogo.module.service.network.RefreshApiService{*;}
-keep interface com.mogo.module.service.network.RefreshCallback{*;}
--keep class com.mogo.module.service.ServiceConst{*;}
\ No newline at end of file
diff --git a/modules/mogo-module-service/proguard-rules.pro b/modules/mogo-module-service/proguard-rules.pro
index 4df50abc36..6f94c0c3a7 100644
--- a/modules/mogo-module-service/proguard-rules.pro
+++ b/modules/mogo-module-service/proguard-rules.pro
@@ -23,7 +23,5 @@
#-----ServiceModule-----
-keep class com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo.*{*;}
-keep class com.mogo.module.service.network.RefreshBody.*{*;}
--keep interface com.mogo.module.service.intent.IntentHandler
-keep interface com.mogo.module.service.network.RefreshApiService
-keep interface com.mogo.module.service.network.RefreshCallback
--keep class com.mogo.module.service.ServiceConst
\ No newline at end of file
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java
index b7b5669920..95279295b4 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java
@@ -2,11 +2,7 @@ package com.mogo.module.service;
import android.content.Context;
-import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.service.marker.MapMarkerManager;
-import com.mogo.service.IMogoServiceApis;
-import com.mogo.service.intent.IMogoIntentManager;
-import com.mogo.service.statusmanager.IMogoStatusManager;
/**
* author : donghongyu
@@ -18,28 +14,8 @@ import com.mogo.service.statusmanager.IMogoStatusManager;
public class MarkerServiceHandler {
private static final String TAG = "MarkerServiceHandler";
- private static IMogoServiceApis sApis;
-
- private static IMogoStatusManager sMogoStatusManager;
- private static IMogoIntentManager sIntentManager;
-
public static synchronized void init(final Context context) {
- sApis = MogoApisHandler.getInstance().getApis();
- sMogoStatusManager = sApis.getStatusManagerApi();
- sIntentManager = sApis.getIntentManagerApi();
MapMarkerManager.getInstance().init(context);
}
- public static IMogoServiceApis getApis() {
- return sApis;
- }
-
- public static IMogoStatusManager getMogoStatusManager() {
- return sMogoStatusManager;
- }
-
- public static IMogoIntentManager getIntentManager() {
- return sIntentManager;
- }
-
}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServiceProvider.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServiceProvider.java
deleted file mode 100644
index 6c97ca2e98..0000000000
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServiceProvider.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.mogo.module.service;
-
-
-import android.content.Context;
-import android.os.Bundle;
-import android.view.View;
-
-import androidx.annotation.NonNull;
-import androidx.fragment.app.Fragment;
-
-import com.alibaba.android.arouter.facade.annotation.Route;
-import com.mogo.module.service.routeoverlay.MogoRouteOverlayManager;
-import com.mogo.service.module.IMogoModuleProvider;
-
-/**
- * @author congtaowang
- * @since 2020-01-03
- *
- * 数据刷新策略
- *
- * 1. 位置移动触发刷新
- * 2. 用户手势交互导致地图视图移动跨过当前视图,延时 1 分钟,不累加
- * 3. 用户手势缩小比例尺级别达2级,延时 1 分钟,不累加
- * 4. 用户交互语音导致地图视图移动,缩放,不触发刷新
- */
-@Route( path = ServiceConst.PATH_REFRESH_STRATEGY )
-public class MogoServiceProvider implements IMogoModuleProvider {
-
- private static final String TAG = "MogoRefreshStrategyProvider";
-
- @Override
- public int getType() {
- return 0;
- }
-
- @NonNull
- @Override
- public String getModuleName() {
- return ServiceConst.TYPE;
- }
-
- @Override
- public Fragment createFragment( Context context, Bundle data ) {
- return null;
- }
-
- @Override
- public View createView( Context context ) {
- return null;
- }
-
- @Override
- public String getAppPackage() {
- return null;
- }
-
- @Override
- public String getAppName() {
- return null;
- }
-
- @Override
- public void init( Context context ) {
- MogoRouteOverlayManager.getInstance().init();
- }
-
- @Override
- public void onDestroy() {
- }
-}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/ServiceConst.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/ServiceConst.java
deleted file mode 100644
index e5d25dd1d8..0000000000
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/ServiceConst.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.mogo.module.service;
-
-/**
- * @author congtaowang
- * @since 2020-01-03
- *
- * 描述
- */
-public class ServiceConst {
-
- /**
- * 类型
- */
- public static final String TYPE = "STRATEGY_REFRESH";
-
- /**
- * 刷新策略模块地址
- */
- public static final String PATH_REFRESH_STRATEGY = "/strategy/refresh";
-
- /**
- * 卡片 用户数据
- */
- public static final String CARD_TYPE_USER_DATA = "CARD_TYPE_USER_DATA";
-
- /**
- * 卡片 新鲜事
- */
- public static final String CARD_TYPE_NOVELTY = "CARD_TYPE_NOVELTY";
-
-
- public static final int ONLINE_SEARCH_LIMIT = 20;
- public static final int ONLINE_SEARCH_RADIUS = 2_000;
-
-
-}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/StatusChangedAdapter.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/StatusChangedAdapter.java
deleted file mode 100644
index fb99a728fa..0000000000
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/StatusChangedAdapter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.mogo.module.service;
-
-import com.mogo.commons.AbsMogoApplication;
-import com.mogo.map.MogoMarkerManager;
-import com.mogo.service.statusmanager.IMogoStatusChangedListener;
-import com.mogo.service.statusmanager.StatusDescriptor;
-
-
-/*
- * @author congtaowang
- * @since 2020/8/6
- *
- * 描述
- */
-public abstract class StatusChangedAdapter implements IMogoStatusChangedListener {
-
- private static final String TAG = "StatusChangedAdapter";
-
- private boolean mIsFirstAccOn = true;
-
- @Override
- public final void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
- switch (descriptor) {
- case ACC_STATUS:
- onAccStatusChanged(isTrue);
- break;
- }
- }
-
- public void onAccStatusChanged(boolean accOn) {
- if (accOn) {
- if (mIsFirstAccOn) {
- mIsFirstAccOn = false;
- return;
- }
- }
- MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).removeMarkers();
- }
-
-}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/Utils.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/Utils.java
deleted file mode 100644
index bc8d857307..0000000000
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/Utils.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.mogo.module.service;
-
-import com.mogo.eagle.core.data.map.MogoLatLng;
-
-/**
- * @author congtaowang
- * @since 2020-01-03
- *
- * 描述
- */
-public class Utils {
-
- /**
- * 距离半径计算方式
- *
- * @param point1 点一坐标
- * @param point2 点二坐标
- * @return 两坐标的距离 单位:米(M)
- */
- public static float calculateLineDistance( MogoLatLng point1, MogoLatLng point2 ) {
- if ( point1 != null && point2 != null ) {
- return calculateLineDistance( point1.lon, point1.lat, point2.lon, point2.lat );
- } else {
- return 0.0F;
- }
- }
-
- /**
- * @param lon1
- * @param lat1
- * @param lon2
- * @param lat2
- * @return 两坐标的距离 单位:米(M)
- */
- public static float calculateLineDistance( double lon1, double lat1, double lon2, double lat2 ) {
- try {
- double var2 = lon1;
- double var4 = lat1;
- double var6 = lon2;
- double var8 = lat2;
- var2 *= 0.01745329251994329D;
- var4 *= 0.01745329251994329D;
- var6 *= 0.01745329251994329D;
- var8 *= 0.01745329251994329D;
- double var10 = Math.sin( var2 );
- double var12 = Math.sin( var4 );
- double var14 = Math.cos( var2 );
- double var16 = Math.cos( var4 );
- double var18 = Math.sin( var6 );
- double var20 = Math.sin( var8 );
- double var22 = Math.cos( var6 );
- double var24 = Math.cos( var8 );
- double[] var28 = new double[3];
- double[] var29 = new double[3];
- var28[0] = var16 * var14;
- var28[1] = var16 * var10;
- var28[2] = var12;
- var29[0] = var24 * var22;
- var29[1] = var24 * var18;
- var29[2] = var20;
- return ( float ) ( Math.asin( Math.sqrt( ( var28[0] - var29[0] ) * ( var28[0] - var29[0] ) + ( var28[1] - var29[1] ) * ( var28[1] - var29[1] ) + ( var28[2] - var29[2] ) * ( var28[2] - var29[2] ) ) / 2.0D ) * 1.27420015798544E7D );
- } catch ( Throwable var26 ) {
- var26.printStackTrace();
- return 0.0F;
- }
- }
-
- public static void main( String[] args ) {
- double calculateLineDistance = calculateLineDistance( new MogoLatLng( 39.968598, 116.411121 ), new MogoLatLng( 39.968598, 116.411121 ) );
- System.out.println( "距离点 calculateLineDistance:" + calculateLineDistance );
- }
-}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/AIAssistIntentHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/AIAssistIntentHandler.java
deleted file mode 100644
index 67d928a0c1..0000000000
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/AIAssistIntentHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.mogo.module.service.intent;
-
-import android.content.Context;
-import android.content.Intent;
-
-import com.mogo.commons.voice.AIAssist;
-import com.mogo.module.service.MarkerServiceHandler;
-
-
-/**
- * @author congtaowang
- * @since 2020/6/5
- *
- * 描述
- */
-public class AIAssistIntentHandler implements IntentHandler {
-
- private static final String TAG = "AIAssistIntentHandler";
-
- @Override
- public void handle( Context context, Intent intent ) {
- AIAssist.getInstance( context ).flush();
- MarkerServiceHandler.getMogoStatusManager().setAIAssistReady( TAG, true );
- }
-}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/AccStatusIntentHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/AccStatusIntentHandler.java
deleted file mode 100644
index 7a00b2e765..0000000000
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/AccStatusIntentHandler.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.mogo.module.service.intent;
-
-import android.content.Context;
-import android.content.Intent;
-
-import com.mogo.module.common.utils.CarSeries;
-import com.mogo.module.service.MarkerServiceHandler;
-import com.mogo.module.service.ServiceConst;
-import com.mogo.module.service.receiver.AccStatusReceiver;
-
-/**
- * @author congtaowang
- * @since 2020/6/5
- *
- * 描述
- */
-public class AccStatusIntentHandler implements IntentHandler {
-
- private static volatile AccStatusIntentHandler sInstance;
-
- private AccStatusIntentHandler() {
- }
-
- public static AccStatusIntentHandler getInstance() {
- if ( sInstance == null ) {
- synchronized ( AccStatusIntentHandler.class ) {
- if ( sInstance == null ) {
- sInstance = new AccStatusIntentHandler();
- }
- }
- }
- return sInstance;
- }
-
- public synchronized void release() {
- sInstance = null;
- }
-
- @Override
- public void handle( Context context, Intent intent ) {
- String action = intent.getAction();
- if ( Intent.ACTION_POWER_CONNECTED.equals( action ) ) {
- if ( CarSeries.isF8xxSeries() ) {
- MarkerServiceHandler.getMogoStatusManager().setAccStatus( ServiceConst.TYPE, true );
- }
- } else if ( Intent.ACTION_POWER_DISCONNECTED.equals( action ) ) {
- if ( CarSeries.isF8xxSeries() ) {
- MarkerServiceHandler.getMogoStatusManager().setAccStatus( ServiceConst.TYPE, false );
- }
- }
- }
-}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/EmptyIntentHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/EmptyIntentHandler.java
deleted file mode 100644
index 822017c54d..0000000000
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/EmptyIntentHandler.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.mogo.module.service.intent;
-
-import android.content.Context;
-import android.content.Intent;
-
-/**
- * @author congtaowang
- * @since 2020-04-17
- *
- * 描述
- */
-public class EmptyIntentHandler implements IntentHandler {
-
- private static final String TAG = "EmptyIntentHandler";
-
- @Override
- public void handle( Context context, Intent intent ) {
- }
-}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandler.java
deleted file mode 100644
index cf040875d5..0000000000
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandler.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.mogo.module.service.intent;
-
-import android.content.Context;
-import android.content.Intent;
-
-/**
- * @author congtaowang
- * @since 2020-04-17
- *
- * 描述
- */
-public interface IntentHandler {
-
- void handle( Context context, Intent intent );
-}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandlerFactory.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandlerFactory.java
deleted file mode 100644
index a83f8b12cf..0000000000
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandlerFactory.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.mogo.module.service.intent;
-
-import android.content.Context;
-import android.content.Intent;
-
-import com.mogo.module.service.receiver.AccStatusReceiver;
-import com.mogo.module.service.receiver.MogoReceiver;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author congtaowang
- * @since 2020-04-17
- *
- * 描述
- */
-public class IntentHandlerFactory {
-
- private IntentHandlerFactory() {
- // private constructor
- mHandlers.put( MogoReceiver.ACTION_VOICE_UI, new VoiceUiIntentHandler() );
- mHandlers.put( Intent.ACTION_POWER_CONNECTED, AccStatusIntentHandler.getInstance() );
- mHandlers.put( Intent.ACTION_POWER_DISCONNECTED, AccStatusIntentHandler.getInstance() );
- mHandlers.put( MogoReceiver.ACTION_VOICE_READY, new AIAssistIntentHandler() );
- }
-
- private static final class InstanceHolder {
- private static final IntentHandlerFactory INSTANCE = new IntentHandlerFactory();
- }
-
- public static IntentHandlerFactory getInstance() {
- return InstanceHolder.INSTANCE;
- }
-
- private Object readResolve() {
- // 阻止反序列化,必须实现 Serializable 接口
- return InstanceHolder.INSTANCE;
- }
-
- private final Map< String, IntentHandler > mHandlers = new HashMap<>();
-
- private final IntentHandler DEFAULT = new EmptyIntentHandler();
-
- private IntentHandler getIntentHandler( String intent ) {
- if ( mHandlers.containsKey( intent ) && mHandlers.get( intent ) != null ) {
- return mHandlers.get( intent );
- }
- return DEFAULT;
- }
-
- public void handle( Context context, String intent, Intent obj ) {
- IntentHandler handler = getIntentHandler( intent );
- if ( handler != null ) {
- handler.handle( context, obj );
- }
- }
-
-}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/VoiceUiIntentHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/VoiceUiIntentHandler.java
deleted file mode 100644
index f8aea1e8b7..0000000000
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/VoiceUiIntentHandler.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.mogo.module.service.intent;
-
-import android.content.Context;
-import android.content.Intent;
-import android.text.TextUtils;
-
-import com.mogo.module.service.MarkerServiceHandler;
-import com.mogo.module.service.receiver.MogoReceiver;
-
-public
-/**
- * @author congtaowang
- * @since 2020/6/5
- *
- * 描述
- */
-class VoiceUiIntentHandler implements IntentHandler {
-
- private static final String TAG = "VoiceUiIntentHandler";
-
- @Override
- public void handle( Context context, Intent intent ) {
- String val = intent.getStringExtra( MogoReceiver.PARRAM_WAKE_STATUS );
- if ( TextUtils.equals( val, MogoReceiver.VALUE_DISMISS ) ) {
- MarkerServiceHandler.getMogoStatusManager().setVoiceUIShow( TAG, false );
- } else if ( TextUtils.equals( val, MogoReceiver.VALUE_SHOW ) ) {
- MarkerServiceHandler.getMogoStatusManager().setVoiceUIShow( TAG, true );
- }
- }
-}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java
index 75b7357d08..f926227f94 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java
@@ -2,39 +2,25 @@ package com.mogo.module.service.marker;
import android.content.Context;
import android.graphics.Rect;
-import android.text.TextUtils;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
+import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.utilcode.mogo.toast.ResourcesHelper;
import com.mogo.eagle.core.utilcode.util.ThreadPoolService;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
-import com.mogo.eagle.core.utilcode.util.ViewUtils;
import com.mogo.map.MogoMapUIController;
import com.mogo.map.MogoMarkerManager;
-import com.mogo.map.marker.IMogoMarker;
-import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.module.common.ModuleNames;
-import com.mogo.module.common.drawer.MarkerDrawer;
-import com.mogo.module.common.drawer.marker.IMarkerView;
-import com.mogo.module.common.drawer.marker.MapMarkerAdapter;
-import com.mogo.module.common.drawer.marker.OnlineCarMarkerView;
import com.mogo.module.common.entity.MarkerCardResult;
-import com.mogo.module.common.entity.MarkerOnlineCar;
import com.mogo.module.common.entity.MarkerResponse;
-import com.mogo.module.common.entity.MarkerShowEntity;
import com.mogo.module.common.utils.CloudPoiManager;
-import com.mogo.module.service.MarkerServiceHandler;
import com.mogo.module.service.R;
-import com.mogo.module.service.ServiceConst;
-import com.mogo.module.service.network.RefreshCallback;
import com.mogo.module.service.network.RefreshModel;
-import java.util.List;
-
/**
* author : donghongyu
* e-mail : 1358506549@qq.com
@@ -42,7 +28,7 @@ import java.util.List;
* desc : 大而全的Marker管理
* version: 1.0
*/
-public class MapMarkerManager implements IMogoMarkerClickListener {
+public class MapMarkerManager {
private static final String TAG = "MapMarkerManager";
private Context mContext;
@@ -51,6 +37,8 @@ public class MapMarkerManager implements IMogoMarkerClickListener {
private RefreshModel mRefreshModel;
// 平滑移动事件间隔(单位:秒)
private static final int SMOOTH_DURATION = 15;
+ public static final int ONLINE_SEARCH_LIMIT = 20;
+ public static final int ONLINE_SEARCH_RADIUS = 2_000;
private Rect mMarkerDisplayBounds;
@@ -80,33 +68,11 @@ public class MapMarkerManager implements IMogoMarkerClickListener {
CloudPoiManager.getInstance().updateFromConfig(context);
}
- /**
- * 地图上的Marker点击回调
- */
- @Override
- public boolean onMarkerClicked(IMogoMarker marker) {
- return false;
- }
-
- /**
- * 绘制Marker,这里绘制的会使用markerShowEntities队列进行维护
- *
- * @param markerShowEntity marker 绘制数据实体
- * @return 绘制的Marker
- */
- public synchronized IMogoMarker drawMapMarker(MarkerShowEntity markerShowEntity, int zIndex) {
- try {
- return MarkerDrawer.getInstance().drawMapMarkerImpl(markerShowEntity, zIndex, this);
- } catch (Exception e) {
- return null;
- }
- }
-
private final Runnable runnable = () -> {
MogoLocation location = CallerMapLocationListenerManager.INSTANCE.getCurrentLocation();
if (location != null) {
MogoLatLng mogoLatLng = new MogoLatLng(location.getLatitude(), location.getLongitude());
- getOnlineCarDataImpl(mogoLatLng, false, false, ServiceConst.ONLINE_SEARCH_LIMIT, ServiceConst.ONLINE_SEARCH_RADIUS);
+ getOnlineCarDataImpl(mogoLatLng, false, false, ONLINE_SEARCH_LIMIT, ONLINE_SEARCH_RADIUS);
}
};
@@ -170,7 +136,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener {
* @return
*/
private boolean ignoreOnlineCarRequest() {
- return ignoreDrawRequest() || MarkerServiceHandler.getMogoStatusManager().isVrMode();
+ return ignoreDrawRequest() || MogoStatusManager.getInstance().isVrMode();
}
/**
@@ -186,9 +152,9 @@ public class MapMarkerManager implements IMogoMarkerClickListener {
* @return
*/
private boolean ignoreDrawRequest() {
- return MarkerServiceHandler.getMogoStatusManager().isV2XShow()
- || !MarkerServiceHandler.getMogoStatusManager().isMainPageLaunched()
- || !MarkerServiceHandler.getMogoStatusManager().isMainPageOnResume()
+ return MogoStatusManager.getInstance().isV2XShow()
+ || !MogoStatusManager.getInstance().isMainPageLaunched()
+ || !MogoStatusManager.getInstance().isMainPageOnResume()
|| MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight();
}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshModel.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshModel.java
index 61d9a26efd..174cc7e6be 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshModel.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshModel.java
@@ -9,9 +9,8 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory;
import com.mogo.eagle.core.network.RequestOptions;
import com.mogo.eagle.core.network.SubscribeImpl;
import com.mogo.eagle.core.network.utils.GsonUtil;
-import com.mogo.module.common.constants.HostConst;
+import com.mogo.eagle.core.data.constants.HostConst;
import com.mogo.module.common.entity.MarkerResponse;
-import com.mogo.module.service.ServiceConst;
import java.util.Map;
@@ -31,6 +30,7 @@ public class RefreshModel {
private final Context mContext;
private final RefreshApiService mRefreshApiService;
+ public static final String CARD_TYPE_USER_DATA = "CARD_TYPE_USER_DATA";
public RefreshModel(Context context) {
this.mContext = context;
@@ -65,7 +65,7 @@ public class RefreshModel {
refreshBody.onlyFocus = onlyFocus;
refreshBody.onlySameCity = onlySameCity;
refreshBody.onlyRealUser = onlyRealUser;
- refreshBody.dataType.add(ServiceConst.CARD_TYPE_USER_DATA);
+ refreshBody.dataType.add(CARD_TYPE_USER_DATA);
query.put("data", GsonUtil.jsonFromObject(refreshBody));
mRefreshApiService.queryOnLineCarWithRoute(query)
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/AccStatusReceiver.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/AccStatusReceiver.java
deleted file mode 100644
index 4587001bba..0000000000
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/AccStatusReceiver.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.mogo.module.service.receiver;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-
-import com.mogo.module.service.intent.IntentHandlerFactory;
-
-public class AccStatusReceiver extends BroadcastReceiver {
-
- @Override
- public void onReceive( Context context, Intent intent ) {
- IntentHandlerFactory.getInstance().handle( context, intent.getAction(), intent );
- }
-}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/MogoReceiver.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/MogoReceiver.java
deleted file mode 100644
index 98ed106e41..0000000000
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/receiver/MogoReceiver.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.mogo.module.service.receiver;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.text.TextUtils;
-
-import com.mogo.module.service.MarkerServiceHandler;
-import com.mogo.service.intent.IMogoIntentManager;
-
-/**
- * @author congtaowang
- * @since 2019-10-03
- *
- * 广播接收者
- */
-public class MogoReceiver extends BroadcastReceiver {
-
- /**
- * 语音
- */
- public static final String VOICE_ACTION = "com.zhidao.speech.awake.notify";
- public static final String PARAM_COMMAND = "command";
-
- // 小智语音唤醒UI
- public static final String ACTION_VOICE_UI = "com.zhidao.xiaozhi.wake.status";
- public static final String PARRAM_WAKE_STATUS = "WAKE_STATUS";
- public static final String VALUE_DISMISS = "dismiss";
- public static final String VALUE_SHOW = "show";
-
- /**
- * 小智语音准备就绪
- */
- public static final String ACTION_VOICE_READY = "com.zhidao.auto.AIAssist.ready";
-
- private final IMogoIntentManager mMogoIntentManager;
-
- public MogoReceiver(Context context) {
- mMogoIntentManager = MarkerServiceHandler.getIntentManager();
- }
-
- @Override
- public void onReceive(Context context, Intent intent) {
- final String action = intent.getAction();
- if (TextUtils.equals(VOICE_ACTION, action)) {
- String cmd = intent.getStringExtra(PARAM_COMMAND);
- if (!TextUtils.isEmpty(cmd)) {
- mMogoIntentManager.invoke(cmd, intent);
- }
- } else {
- mMogoIntentManager.invoke(action, intent);
- }
- }
-}
diff --git a/services/mogo-service-api/src/main/java/com/mogo/service/IMogoServiceApis.java b/services/mogo-service-api/src/main/java/com/mogo/service/IMogoServiceApis.java
index 20cd2825ec..a3556a19b8 100644
--- a/services/mogo-service-api/src/main/java/com/mogo/service/IMogoServiceApis.java
+++ b/services/mogo-service-api/src/main/java/com/mogo/service/IMogoServiceApis.java
@@ -3,7 +3,6 @@ package com.mogo.service;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.mogo.service.module.IMogoRegisterCenter;
-import com.mogo.service.statusmanager.IMogoStatusManager;
import com.mogo.service.windowview.IMogoWindowManager;
/**
@@ -15,7 +14,6 @@ import com.mogo.service.windowview.IMogoWindowManager;
public interface IMogoServiceApis extends IProvider {
-
/**
* 各业务回调接口注册接口
*
@@ -23,13 +21,6 @@ public interface IMogoServiceApis extends IProvider {
*/
IMogoRegisterCenter getRegisterCenterApi();
- /**
- * 状态管理接口
- *
- * @return
- */
- IMogoStatusManager getStatusManagerApi();
-
/**
* 桌面浮窗控制接口
*
diff --git a/services/mogo-service-api/src/main/java/com/mogo/service/module/IMogoModuleProvider.java b/services/mogo-service-api/src/main/java/com/mogo/service/module/IMogoModuleProvider.java
deleted file mode 100644
index cf7c50e52a..0000000000
--- a/services/mogo-service-api/src/main/java/com/mogo/service/module/IMogoModuleProvider.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package com.mogo.service.module;
-
-import android.content.Context;
-import android.os.Bundle;
-import android.view.View;
-
-import androidx.annotation.NonNull;
-import androidx.fragment.app.Fragment;
-
-import com.alibaba.android.arouter.facade.template.IProvider;
-
-
-/**
- * @author congtaowang
- * @since 2019-12-24
- *
- * 模块 UI 接口
- */
-public interface IMogoModuleProvider extends IProvider {
-
- /**
- * 创建卡片
- *
- * @param context
- * @return
- */
- Fragment createFragment( Context context, Bundle data );
-
- /**
- * 创建view
- *
- * @param context
- * @return
- */
- default View createView( Context context ){
- return null;
- }
-
- /**
- * 模块唯一标识
- *
- * @return
- */
- @NonNull
- String getModuleName();
-
- /**
- * 是哪种类型的提供者
- *
- * @return
- */
- int getType();
-
- /**
- * 获取模块对应 app 的包名
- *
- * @return
- */
- @Deprecated
- default String getAppPackage() {
- return "";
- }
-
- /**
- * 获取对应模块 app 名称
- *
- * @return
- */
- @Deprecated
- default String getAppName() {
- return "";
- }
-
- default void onDestroy(){
- }
-}
diff --git a/services/mogo-service-api/src/main/java/com/mogo/service/statusmanager/IMogoStatusChangedListener.java b/services/mogo-service-api/src/main/java/com/mogo/service/statusmanager/IMogoStatusChangedListener.java
deleted file mode 100644
index f2cab0e570..0000000000
--- a/services/mogo-service-api/src/main/java/com/mogo/service/statusmanager/IMogoStatusChangedListener.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.mogo.service.statusmanager;
-
-/**
- * @author congtaowang
- * @since 2020-01-04
- *
- * 状态控制器监听
- */
-public interface IMogoStatusChangedListener {
-
- /**
- * @param descriptor 状态类型
- * @param isTrue true - accOn、adas ui show、voice ui show、push ui show、v2x ui show
- */
- void onStatusChanged( StatusDescriptor descriptor, boolean isTrue );
-
-}
diff --git a/services/mogo-service-api/src/main/java/com/mogo/service/statusmanager/IMogoStatusManager.java b/services/mogo-service-api/src/main/java/com/mogo/service/statusmanager/IMogoStatusManager.java
deleted file mode 100644
index aaa92d81eb..0000000000
--- a/services/mogo-service-api/src/main/java/com/mogo/service/statusmanager/IMogoStatusManager.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package com.mogo.service.statusmanager;
-
-import com.alibaba.android.arouter.facade.template.IProvider;
-
-/**
- * @author congtaowang
- * @since 2020-01-02
- *
- * 车机状态
- */
-public interface IMogoStatusManager extends IProvider {
-
- /**
- * 是否在vr模式
- * @return true - 在vr模式 false - 不在vr模式
- */
- boolean isVrMode();
-
- /**
- * 小智语音 UI 是否在展示
- *
- * @return
- */
- boolean isVoiceShow();
-
- /**
- * v2x UI 是否在展示
- *
- * @return
- */
- boolean isV2XShow();
-
- /**
- * 是否开机
- *
- * @return true - 开机 false - 关机
- */
- boolean isAccOn();
-
- /**
- * 主页是否显示
- *
- * @return
- */
- boolean isMainPageOnResume();
-
- /**
- * 主页是否在后台运行
- *
- * @return true-在后台,false-不在后台
- */
- boolean isMainPageIsBackground();
-
- /**
- * 主页是否已启动
- *
- * @return
- */
- boolean isMainPageLaunched();
-
- /**
- * 设置vrMode状态
- * @param tag 业务类型
- * @param vrMode true - 在vr模式 false 不在vr模式
- */
- void setVrMode(String tag, boolean vrMode);
-
- /**
- * 设置小智语音UI状态
- *
- * @param tag 业务类型
- * @param show true - 显示 false - 隐藏
- */
- void setVoiceUIShow( String tag, boolean show );
-
- /**
- * 设置 V2X UI 状态
- *
- *
- * @param tag 业务类型
- * @param show true - 显示 false - 隐藏
- */
- void setV2XUIShow( String tag, boolean show );
-
- /**
- * 设置 acc 状态
- *
- * @param tag 业务类型
- * @param isOn true - on, false - off
- */
- void setAccStatus( String tag, boolean isOn );
-
- /**
- * 主页 resume 状态
- *
- * @param tag
- * @param resume
- */
- void setMainPageResumeStatus( String tag, boolean resume );
-
- /**
- * 主页 后台运行 状态
- *
- * @param tag 控制来源
- * @param isBackground true-在后台运行,false-不在后台运行(也可能是挂了)
- */
- void setMainPageIsBackgroundStatus( String tag, boolean isBackground );
-
- /**
- * 设置小智语音状态
- *
- * @param tag
- * @param ready
- */
- void setAIAssistReady( String tag, boolean ready );
-
- /**
- * 设置求助状态
- *
- * @param tag
- * @param seekHelping
- */
- void setSeekHelping( String tag, boolean seekHelping );
-
- /**
- * 设置主页是否启动
- *
- * @param tag
- * @param launched
- */
- void setMainPageLaunchedStatus( String tag, boolean launched );
-
- /**
- * 注册监听
- *
- * @param tag 业务类型
- * @param descriptor 监听类型
- * @param listener 监听回调
- */
- void registerStatusChangedListener( String tag, StatusDescriptor descriptor, IMogoStatusChangedListener listener );
-
- /**
- * 注销
- *
- * @param tag 业务类型
- * @param descriptor 注销类型
- * @param listener 注销回调
- */
- void unregisterStatusChangedListener( String tag, StatusDescriptor descriptor, IMogoStatusChangedListener listener );
-}
diff --git a/services/mogo-service-api/src/main/java/com/mogo/service/statusmanager/IMogoStickyStatusChangedListener.java b/services/mogo-service-api/src/main/java/com/mogo/service/statusmanager/IMogoStickyStatusChangedListener.java
deleted file mode 100644
index 60a79be75f..0000000000
--- a/services/mogo-service-api/src/main/java/com/mogo/service/statusmanager/IMogoStickyStatusChangedListener.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.mogo.service.statusmanager;
-
-/**
- * @author congtaowang
- * @since 2020-01-04
- *
- * 状态控制器监听
- */
-public interface IMogoStickyStatusChangedListener extends IMogoStatusChangedListener {
-
- /**
- * 是否需要黏性状态: 先改变状态,后注册监听
- *
- * @param descriptor 状态
- * @return 默认不需要
- */
- boolean requestStickyStatus( StatusDescriptor descriptor );
-}
diff --git a/services/mogo-service-api/src/main/java/com/mogo/service/statusmanager/StatusDescriptor.java b/services/mogo-service-api/src/main/java/com/mogo/service/statusmanager/StatusDescriptor.java
deleted file mode 100644
index 93f010345d..0000000000
--- a/services/mogo-service-api/src/main/java/com/mogo/service/statusmanager/StatusDescriptor.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.mogo.service.statusmanager;
-
-/**
- * @author congtaowang
- * @since 2020-01-04
- *
- * 状态描述
- */
-public enum StatusDescriptor {
-
- /**
- * v2x UI
- */
- V2X_UI,
-
- /**
- * 小智语音交互 UI
- */
- VOICE_UI,
-
- /**
- * 开机状态
- */
- ACC_STATUS,
-
- /**
- * 主页 resume 状态
- */
- MAIN_PAGE_RESUME,
-
- /**
- * 主页 isBackground 状态
- */
- MAIN_PAGE_IS_BACKGROUND,
-
- /**
- * 小智语音状态
- */
- AI_ASSIST_READY,
-
- /**
- * 求助状态
- */
- SEEK_HELPING,
-
- /**
- * 是否已经进入过主页
- */
- MAIN_PAGE_CREATED,
-
- /**
- * 是否已经进入vr模式
- */
- VR_MODE,
-
-
-}
diff --git a/services/mogo-service/src/main/java/com/mogo/service/impl/MogoServiceApis.java b/services/mogo-service/src/main/java/com/mogo/service/impl/MogoServiceApis.java
index 193fbd5bc2..5321fa460f 100644
--- a/services/mogo-service/src/main/java/com/mogo/service/impl/MogoServiceApis.java
+++ b/services/mogo-service/src/main/java/com/mogo/service/impl/MogoServiceApis.java
@@ -8,9 +8,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.eagle.core.data.constants.MogoServicePaths;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.service.IMogoServiceApis;
-import com.mogo.service.impl.singleton.SingletonsHolder;
import com.mogo.service.module.IMogoRegisterCenter;
-import com.mogo.service.statusmanager.IMogoStatusManager;
import com.mogo.service.windowview.IMogoWindowManager;
/**
@@ -27,11 +25,6 @@ public class MogoServiceApis implements IMogoServiceApis {
private static final Object sLock = new Object();
- @Override
- public IMogoStatusManager getStatusManagerApi() {
- return SingletonsHolder.get(IMogoStatusManager.class);
- }
-
@Override
public void init(Context context) {
@@ -50,23 +43,14 @@ public class MogoServiceApis implements IMogoServiceApis {
}
private static T getApiInstance(Class clazz, String path) {
- T inst = SingletonsHolder.get(clazz);
- if (inst == null) {
- synchronized (sLock) {
- inst = SingletonsHolder.get(clazz);
- if (inst != null) {
- return inst;
- }
- T newInst = (T) ARouter.getInstance().build(path).navigation();
- try {
- SingletonsHolder.registerApi(clazz, newInst);
- CallerLogger.INSTANCE.d(TAG, "keep IProvider instance to SingletonHolder: path = " + path);
- } catch (Exception e) {
- e.printStackTrace();
- }
- return newInst;
+ synchronized (sLock) {
+ T newInst = (T) ARouter.getInstance().build(path).navigation();
+ try {
+ CallerLogger.INSTANCE.d(TAG, "keep IProvider instance to SingletonHolder: path = " + path);
+ } catch (Exception e) {
+ e.printStackTrace();
}
+ return newInst;
}
- return inst;
}
-}
+}
\ No newline at end of file
diff --git a/services/mogo-service/src/main/java/com/mogo/service/impl/singleton/SingletonsHolder.java b/services/mogo-service/src/main/java/com/mogo/service/impl/singleton/SingletonsHolder.java
deleted file mode 100644
index 27da730979..0000000000
--- a/services/mogo-service/src/main/java/com/mogo/service/impl/singleton/SingletonsHolder.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.mogo.service.impl.singleton;
-
-import com.alibaba.android.arouter.facade.template.IProvider;
-import com.mogo.service.impl.statusmanager.MogoStatusManager;
-import com.mogo.service.statusmanager.IMogoStatusManager;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * @author congtaowang
- * @since 2020-03-06
- *
- * 描述
- */
-public class SingletonsHolder {
-
- private static final Map sSingletons = new ConcurrentHashMap<>();
-
- static {
- sSingletons.put(IMogoStatusManager.class, new MogoStatusManager());
- }
-
- public static T get(Class clazz) {
- return (T) sSingletons.get(clazz);
- }
-
- public static void registerApi(Class extends IProvider> api, T impl) throws Exception {
- if (api == null || impl == null) {
- return;
- }
- sSingletons.put(api, impl);
- }
-}
diff --git a/services/mogo-service/src/main/java/com/mogo/service/impl/statusmanager/MogoStatusManager.java b/services/mogo-service/src/main/java/com/mogo/service/impl/statusmanager/MogoStatusManager.java
deleted file mode 100644
index d319f85b4f..0000000000
--- a/services/mogo-service/src/main/java/com/mogo/service/impl/statusmanager/MogoStatusManager.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package com.mogo.service.impl.statusmanager;
-
-
-import android.content.Context;
-
-import com.alibaba.android.arouter.facade.annotation.Route;
-import com.mogo.eagle.core.data.constants.MogoServicePaths;
-import com.mogo.service.statusmanager.IMogoStatusChangedListener;
-import com.mogo.service.statusmanager.IMogoStatusManager;
-import com.mogo.service.statusmanager.IMogoStickyStatusChangedListener;
-import com.mogo.service.statusmanager.StatusDescriptor;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * @author congtaowang
- * @since 2020-01-02
- *
- * 状态控制器
- */
-public class MogoStatusManager implements IMogoStatusManager {
-
- private static final String TAG = "MogoStatusManager";
-
- /**
- * 状态记录
- */
- private static final Map< StatusDescriptor, Boolean > mStatus = new ConcurrentHashMap<>();
-
- /**
- * 回调集合
- */
- private static final Map< StatusDescriptor, List< IMogoStatusChangedListener > > mListeners = new ConcurrentHashMap<>();
-
- /**
- * 状态类型修改记录
- */
- private static final Map< StatusDescriptor, String > mModifier = new ConcurrentHashMap<>();
-
- @Override
- public boolean isVoiceShow() {
- return get_bool_val( StatusDescriptor.VOICE_UI );
- }
-
- @Override
- public boolean isVrMode() {
- return get_bool_val(StatusDescriptor.VR_MODE);
- }
-
- @Override
- public boolean isV2XShow() {
- return get_bool_val( StatusDescriptor.V2X_UI );
- }
-
- @Override
- public boolean isAccOn() {
- return get_bool_val( StatusDescriptor.ACC_STATUS );
- }
-
- @Override
- public boolean isMainPageOnResume() {
- return get_bool_val( StatusDescriptor.MAIN_PAGE_RESUME );
- }
-
- @Override
- public boolean isMainPageIsBackground() {
- return get_bool_val( StatusDescriptor.MAIN_PAGE_IS_BACKGROUND );
- }
-
- @Override
- public boolean isMainPageLaunched() {
- return get_bool_val( StatusDescriptor.MAIN_PAGE_CREATED );
- }
-
- private boolean get_bool_val(StatusDescriptor descriptor ) {
- Boolean val = mStatus.get( descriptor );
- return val != null && val;
- }
-
- @Override
- public void setVrMode(String tag, boolean vrMode) {
- doSetStatus(tag, StatusDescriptor.VR_MODE, vrMode);
- }
-
- @Override
- public void setVoiceUIShow( String tag, boolean show ) {
- doSetStatus( tag, StatusDescriptor.VOICE_UI, show );
- }
-
- @Override
- public void setV2XUIShow( String tag, boolean show ) {
- doSetStatus( tag, StatusDescriptor.V2X_UI, show );
- }
-
- @Override
- public void setAccStatus( String tag, boolean isOn ) {
- doSetStatus( tag, StatusDescriptor.ACC_STATUS, isOn );
- }
-
- @Override
- public void setMainPageResumeStatus( String tag, boolean resume ) {
- doSetStatus( tag, StatusDescriptor.MAIN_PAGE_RESUME, resume );
- }
-
- @Override
- public void setMainPageIsBackgroundStatus(String tag, boolean isBackground) {
- doSetStatus( tag, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, isBackground );
- }
-
- @Override
- public void setAIAssistReady( String tag, boolean ready ) {
- doSetStatus( tag, StatusDescriptor.AI_ASSIST_READY, ready );
- }
-
- @Override
- public void setSeekHelping( String tag, boolean seekHelping ) {
- doSetStatus( tag, StatusDescriptor.SEEK_HELPING, seekHelping );
- }
-
- @Override
- public void setMainPageLaunchedStatus( String tag, boolean launched ) {
- doSetStatus( tag, StatusDescriptor.MAIN_PAGE_CREATED, launched );
- }
-
- private void doSetStatus( String tag, StatusDescriptor target, boolean value ) {
- mStatus.put( target, value );
- invokeStatusChangedListener( target, value );
- recordStatusModifier( tag, target );
- }
-
- private void invokeStatusChangedListener( StatusDescriptor descriptor, boolean status ) {
- List< IMogoStatusChangedListener > listenerList = mListeners.get( descriptor );
- if ( listenerList != null && listenerList.size() > 0 ) {
- IMogoStatusChangedListener[] listeners = new IMogoStatusChangedListener[listenerList.size()];
- listenerList.toArray( listeners );
- for ( IMogoStatusChangedListener listener : listeners ) {
- if ( listener != null ) {
- listener.onStatusChanged( descriptor, status );
- }
- }
- }
- }
-
- private void recordStatusModifier( String tag, StatusDescriptor descriptor ) {
- mModifier.put( descriptor, tag );
- }
-
- @Override
- public void registerStatusChangedListener( String tag, StatusDescriptor descriptor, IMogoStatusChangedListener listener ) {
- if ( listener == null || descriptor == null ) {
- return;
- }
- if ( !mListeners.containsKey( descriptor ) ) {
- mListeners.put( descriptor, new ArrayList<>() );
- }
- mListeners.get( descriptor ).add( listener );
-
- if ( listener instanceof IMogoStickyStatusChangedListener && ((IMogoStickyStatusChangedListener)listener).requestStickyStatus( descriptor ) ) {
- Boolean val = mStatus.get( descriptor );
- if ( val != null ) {
- listener.onStatusChanged( descriptor, get_bool_val( descriptor ) );
- }
- }
- }
-
- @Override
- public void unregisterStatusChangedListener( String tag, StatusDescriptor descriptor, IMogoStatusChangedListener listener ) {
- if ( mListeners.get( descriptor ) != null ) {
- mListeners.get( descriptor ).remove( listener );
- }
- }
-
- @Override
- public void init( Context context ) {
- }
-}