[V2X]移除无用代码
This commit is contained in:
@@ -43,75 +43,6 @@ public interface IMoGoV2XMarkerManager extends IProvider {
|
||||
*/
|
||||
void analysisV2XRoadEvent(V2XMarkerCardResult markerCardResult);
|
||||
|
||||
/**
|
||||
* 绘制V2X 地图点事件
|
||||
*
|
||||
* @param markerCardResult 大而全中过滤出来的点事件
|
||||
*/
|
||||
void drawableV2XMarker(MarkerCardResult markerCardResult);
|
||||
|
||||
/**
|
||||
* 绘制 在线车辆 POI
|
||||
*
|
||||
* @param markerOnlineCars
|
||||
* @param clickListener
|
||||
*/
|
||||
void drawableOnlineCarPOI(List<MarkerOnlineCar> markerOnlineCars, IMogoMarkerClickListener clickListener);
|
||||
|
||||
/**
|
||||
* 清除 在线车辆 POI
|
||||
*/
|
||||
void clearOnlineCarPOI();
|
||||
|
||||
|
||||
/**
|
||||
* 绘制可以直播的在线车辆
|
||||
*
|
||||
* @param markerOnlineCars
|
||||
* @param clickListener
|
||||
*/
|
||||
void drawableLiveCarPOI(List<MarkerOnlineCar> markerOnlineCars, IMogoMarkerClickListener clickListener);
|
||||
|
||||
/**
|
||||
* 清除 可以直播的在线车辆 POI
|
||||
*/
|
||||
void clearLiveCarPOI();
|
||||
|
||||
/**
|
||||
* 绘制 探路
|
||||
*
|
||||
* @param exploreWayList
|
||||
* @param clickListener
|
||||
*/
|
||||
void drawableExplorePOI(List<MarkerExploreWay> exploreWayList, IMogoMarkerClickListener clickListener);
|
||||
|
||||
/**
|
||||
* 清除 探路 POI
|
||||
*/
|
||||
void clearExplorePOI();
|
||||
|
||||
/**
|
||||
* 绘制 新鲜事儿
|
||||
*
|
||||
* @param noveltyInfoList
|
||||
* @param clickListener
|
||||
*/
|
||||
void drawableNoveltyPOI(List<MarkerNoveltyInfo> noveltyInfoList, IMogoMarkerClickListener clickListener);
|
||||
|
||||
/**
|
||||
* 清除 新鲜事儿 POI
|
||||
*/
|
||||
void clearNoveltyPOI();
|
||||
|
||||
/**
|
||||
* 绘制Marker,上面调用的都是这个方法
|
||||
*
|
||||
* @param context
|
||||
* @param markerShowEntity
|
||||
* @param clickListener
|
||||
*/
|
||||
void drawableMarker(Context context, MarkerShowEntity markerShowEntity, IMogoMarkerClickListener clickListener);
|
||||
|
||||
|
||||
/**
|
||||
* 展开气泡
|
||||
|
||||
@@ -25,58 +25,16 @@ public interface IMoGoV2XStatusManager extends IProvider {
|
||||
*/
|
||||
boolean isRoadEventWindowShow();
|
||||
|
||||
/**
|
||||
* 头部 V2X的道路直播 UI 是否在展示
|
||||
*/
|
||||
boolean isRoadLiveCarWindowShow();
|
||||
|
||||
/**
|
||||
* 头部 他人车辆故障求助 UI 是否在展示
|
||||
*/
|
||||
boolean isOtherSeekHelpWindowShow();
|
||||
|
||||
/**
|
||||
* 地图区域 自身的道路求助按钮 是否在展示
|
||||
*/
|
||||
boolean isMeSeekHelpButtonShow();
|
||||
|
||||
/**
|
||||
* 地图区域 他人车辆故障求助POI 是否在展示
|
||||
*/
|
||||
boolean isOtherSeekHelpPOIShow();
|
||||
|
||||
/**
|
||||
* 前瞻需求
|
||||
* 右侧2/3 V2X 场景动画 UI 是否在展示
|
||||
*/
|
||||
boolean isV2XAnimationShow();
|
||||
|
||||
/**
|
||||
* 前瞻需求
|
||||
* 右侧2/3 左下角 模拟直播车机 UI 是否在展示
|
||||
*/
|
||||
boolean isLeftLiveVideoShow();
|
||||
|
||||
/**
|
||||
* 推送弹窗的状态
|
||||
*/
|
||||
boolean isPushWindowShow();
|
||||
|
||||
/**
|
||||
* 推送的 POI 状态
|
||||
*/
|
||||
boolean isPushPOIShow();
|
||||
|
||||
/**
|
||||
* 疲劳驾驶 状态
|
||||
*/
|
||||
boolean isFatigueDrivingWindowShow();
|
||||
|
||||
/**
|
||||
* 事件面板状态 状态
|
||||
*/
|
||||
boolean isEventPanelWindowShow();
|
||||
|
||||
/**
|
||||
* 设置 V2X道路预警POI 是否在展示
|
||||
*
|
||||
@@ -117,22 +75,6 @@ public interface IMoGoV2XStatusManager extends IProvider {
|
||||
*/
|
||||
void setOtherSeekHelpWindowShow(String tag, boolean show);
|
||||
|
||||
/**
|
||||
* 地图区域 自身的道路求助按钮 是否在展示
|
||||
*
|
||||
* @param tag
|
||||
* @param show
|
||||
*/
|
||||
void setMeSeekHelpButtonShow(String tag, boolean show);
|
||||
|
||||
/**
|
||||
* 地图区域 他人车辆故障求助POI 是否在展示
|
||||
*
|
||||
* @param tag
|
||||
* @param show
|
||||
*/
|
||||
void setOtherSeekHelpPOIShow(String tag, boolean show);
|
||||
|
||||
/**
|
||||
* 设置 右侧2/3 全屏 V2X 场景动画 是否在展示
|
||||
*
|
||||
@@ -177,30 +119,4 @@ public interface IMoGoV2XStatusManager extends IProvider {
|
||||
* @param show
|
||||
*/
|
||||
void setFatigueDrivingWindowShow(String tag, boolean show);
|
||||
|
||||
/**
|
||||
* 事件面板状态 是否在展示
|
||||
*
|
||||
* @param tag
|
||||
* @param show
|
||||
*/
|
||||
void setEventPanelWindowShow(String tag, boolean show);
|
||||
|
||||
/**
|
||||
* 注册监听
|
||||
*
|
||||
* @param tag 业务类型
|
||||
* @param descriptor 监听类型
|
||||
* @param listener 监听回调
|
||||
*/
|
||||
void registerStatusChangedListener(String tag, V2XStatusDescriptor descriptor, IMoGoV2XStatusChangedListener listener);
|
||||
|
||||
/**
|
||||
* 注销
|
||||
*
|
||||
* @param tag 业务类型
|
||||
* @param descriptor 注销类型
|
||||
* @param listener 注销回调
|
||||
*/
|
||||
void unregisterStatusChangedListener(String tag, V2XStatusDescriptor descriptor, IMoGoV2XStatusChangedListener listener);
|
||||
}
|
||||
|
||||
@@ -38,11 +38,6 @@ public enum V2XStatusDescriptor {
|
||||
*/
|
||||
OtherSeekHelpWindow_UI,
|
||||
|
||||
/**
|
||||
* 头部 自身的道路求助按钮 UI 是否在展示
|
||||
*/
|
||||
MeSeekHelpButton_UI,
|
||||
|
||||
/**
|
||||
* 右侧2/3 V2X 场景动画 UI 是否在展示
|
||||
*/
|
||||
@@ -71,10 +66,5 @@ public enum V2XStatusDescriptor {
|
||||
/**
|
||||
* 疲劳驾驶弹窗
|
||||
*/
|
||||
FatigueDrivingWindow_UI,
|
||||
|
||||
/**
|
||||
* 事件面板状态
|
||||
*/
|
||||
EventPanelWindow_UI,
|
||||
FatigueDrivingWindow_UI
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
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.listener.V2XMarkerClickListener;
|
||||
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.manager.IMoGoV2XStatusManager;
|
||||
@@ -31,11 +30,8 @@ import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
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.entity.MarkerCardResult;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.MarkerNoveltyInfo;
|
||||
import com.mogo.module.common.entity.MarkerOnlineCar;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
@@ -173,266 +169,6 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawableV2XMarker(MarkerCardResult markerCardResult) {
|
||||
|
||||
boolean isShowEventWindow = false;
|
||||
boolean isShowEventButton = false;
|
||||
boolean isOtherSeekHelpWindowShow = false;
|
||||
IMoGoV2XStatusManager v2xStatus = BridgeApi.INSTANCE.v2xStatus();
|
||||
if (v2xStatus != null) {
|
||||
//预警Window状态
|
||||
isShowEventWindow = v2xStatus.isRoadEventWindowShow();
|
||||
//预警按钮状态
|
||||
isShowEventButton = v2xStatus.isRoadEventButtonShow();
|
||||
//道路求助的window
|
||||
isOtherSeekHelpWindowShow = v2xStatus.isOtherSeekHelpWindowShow();
|
||||
}
|
||||
try {
|
||||
//当没有预警提示的时候重新绘制地图POI点
|
||||
if (!isShowEventWindow && !isShowEventButton && !isOtherSeekHelpWindowShow) {
|
||||
// 清除上次的道路事件,TODO 这里注意,道路事件的触发和这里是异步操作会触发异常
|
||||
//mV2XRoadEventEntityArrayList.clear();
|
||||
// 清除原来的大而全的新鲜事儿
|
||||
try {
|
||||
clearALLPOI();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 清除连接线
|
||||
IMoGoV2XPolylineManager polylineManager = BridgeApi.INSTANCE.v2xPolyline();
|
||||
if (polylineManager != null) {
|
||||
polylineManager.clearLine();
|
||||
}
|
||||
if (markerCardResult != null) {
|
||||
// 绘制新的地图气泡
|
||||
List<MarkerOnlineCar> onlineCarList = markerCardResult.getOnlineCar();
|
||||
List<MarkerExploreWay> exploreWayList = markerCardResult.getExploreWay();
|
||||
List<MarkerNoveltyInfo> noveltyInfoList = markerCardResult.getNoveltyInfo();
|
||||
|
||||
drawableOnlineCarPOI(onlineCarList, V2XMarkerClickListener.getInstance());
|
||||
drawableExplorePOI(exploreWayList, V2XMarkerClickListener.getInstance());
|
||||
drawableNoveltyPOI(noveltyInfoList, V2XMarkerClickListener.getInstance());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawableOnlineCarPOI(List<MarkerOnlineCar> markerOnlineCars, IMogoMarkerClickListener clickListener) {
|
||||
try {
|
||||
if (markerOnlineCars != null) {
|
||||
for (MarkerOnlineCar markerOnlineCar : markerOnlineCars) {
|
||||
MarkerLocation markerLocation = markerOnlineCar.getLocation();
|
||||
|
||||
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
markerShowEntity.setBindObj(markerOnlineCar);
|
||||
markerShowEntity.setMarkerLocation(markerLocation);
|
||||
markerShowEntity.setMarkerType(markerOnlineCar.getType());
|
||||
markerShowEntity.setTextContent(markerOnlineCar.getUserInfo().getSafeLabel());
|
||||
markerShowEntity.setIconUrl(markerOnlineCar.getUserInfo().getUserHead());
|
||||
|
||||
drawableMarker(BridgeApi.INSTANCE.context(), markerShowEntity, clickListener);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearOnlineCarPOI() {
|
||||
IMogoMarkerManager marker = BridgeApi.INSTANCE.marker();
|
||||
if (marker != null) {
|
||||
marker.removeMarkers(V2XConst.V2X_CARD_TYPE_USER_DATA);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void drawableLiveCarPOI(List<MarkerOnlineCar> markerOnlineCars, IMogoMarkerClickListener clickListener) {
|
||||
try {
|
||||
Logger.w(MODULE_NAME, "V2X===事件周边的直播车机:" + markerOnlineCars);
|
||||
if (markerOnlineCars != null) {
|
||||
for (MarkerOnlineCar markerOnlineCar : markerOnlineCars) {
|
||||
// 设置车类型
|
||||
markerOnlineCar.getUserInfo().setSafeLabelType(4);
|
||||
markerOnlineCar.getCarInfo().setVehicleType(0);
|
||||
|
||||
MarkerLocation markerLocation = markerOnlineCar.getLocation();
|
||||
|
||||
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
markerShowEntity.setBindObj(markerOnlineCar);
|
||||
markerShowEntity.setMarkerLocation(markerLocation);
|
||||
markerShowEntity.setMarkerType(V2XConst.V2X_MARKER_LIVE_CAR);
|
||||
markerShowEntity.setTextContent(markerOnlineCar.getUserInfo().getSafeLabel());
|
||||
markerShowEntity.setIconUrl(markerOnlineCar.getUserInfo().getUserHead());
|
||||
|
||||
drawableMarker(
|
||||
BridgeApi.INSTANCE.context(),
|
||||
markerShowEntity,
|
||||
clickListener);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearLiveCarPOI() {
|
||||
IMogoMarkerManager marker = BridgeApi.INSTANCE.marker();
|
||||
if (marker != null) {
|
||||
marker.removeMarkers(V2XConst.V2X_MARKER_LIVE_CAR);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawableExplorePOI(List<MarkerExploreWay> exploreWayList, IMogoMarkerClickListener clickListener) {
|
||||
try {
|
||||
if (exploreWayList != null) {
|
||||
for (MarkerExploreWay markerExploreWay : exploreWayList) {
|
||||
// 因为目前探路卡片不支持直播,所以这里做了过滤 @李小鹏
|
||||
if (!markerExploreWay.getCanLive()) {
|
||||
MarkerLocation markerLocation = markerExploreWay.getLocation();
|
||||
|
||||
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
markerShowEntity.setBindObj(markerExploreWay);
|
||||
markerShowEntity.setMarkerLocation(markerLocation);
|
||||
markerShowEntity.setMarkerType(markerExploreWay.getType());
|
||||
markerShowEntity.setTextContent(markerExploreWay.getAddr());
|
||||
|
||||
drawableMarker(
|
||||
BridgeApi.INSTANCE.context(),
|
||||
markerShowEntity,
|
||||
clickListener);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearExplorePOI() {
|
||||
IMogoMarkerManager marker = BridgeApi.INSTANCE.marker();
|
||||
if (marker != null) {
|
||||
marker.removeMarkers(V2XConst.V2X_CARD_TYPE_ROAD_CONDITION);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawableNoveltyPOI(List<MarkerNoveltyInfo> noveltyInfoList, IMogoMarkerClickListener clickListener) {
|
||||
try {
|
||||
if (noveltyInfoList != null) {
|
||||
for (MarkerNoveltyInfo noveltyInfo : noveltyInfoList) {
|
||||
MarkerLocation markerLocation = noveltyInfo.getLocation();
|
||||
|
||||
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
markerShowEntity.setBindObj(noveltyInfo);
|
||||
markerShowEntity.setMarkerLocation(markerLocation);
|
||||
markerShowEntity.setMarkerType(noveltyInfo.getType());
|
||||
markerShowEntity.setTextContent(noveltyInfo.getLocation().getAddress());
|
||||
|
||||
// 这里只绘制道路事件相关
|
||||
if (EventTypeEnum.TRAFFIC_CHECK.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.ROAD_CLOSED.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ROAD_WORK.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_BLOCK_UP.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_PONDING.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_PARKING.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ICE.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_FOG.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ACCIDENT.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ACCIDENT_01.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ACCIDENT_02.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ACCIDENT_03.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ACCIDENT_04.getPoiType().equals(noveltyInfo.getPoiType())
|
||||
|| EventTypeEnum.FOURS_ACCIDENT_05.getPoiType().equals(noveltyInfo.getPoiType())) {
|
||||
drawableMarker(BridgeApi.INSTANCE.context(), markerShowEntity, clickListener);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearNoveltyPOI() {
|
||||
IMogoMarkerManager marker = BridgeApi.INSTANCE.marker();
|
||||
if (marker != null) {
|
||||
marker.removeMarkers(V2XConst.V2X_CARD_TYPE_NOVELTY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawableMarker(Context context, MarkerShowEntity markerShowEntity, IMogoMarkerClickListener clickListener) {
|
||||
// Logger.i(MODULE_NAME, "绘制Marker====drawMapMarker:" + markerShowEntity);
|
||||
try {
|
||||
if (markerShowEntity.getMarkerLocation() != null) {
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.data(markerShowEntity)
|
||||
.latitude(markerShowEntity.getMarkerLocation().getLat())
|
||||
.longitude(markerShowEntity.getMarkerLocation().getLon());
|
||||
|
||||
// 这里对Marker做下持有者转换,与大而全的区分开,由于绘制的时候用到了低层能力所以不去修改markerShowEntity中的type
|
||||
switch (markerShowEntity.getMarkerType()) {
|
||||
case ServiceConst.CARD_TYPE_USER_DATA:
|
||||
options.owner(V2XConst.V2X_CARD_TYPE_USER_DATA);
|
||||
break;
|
||||
case ServiceConst.CARD_TYPE_NOVELTY:
|
||||
options.owner(V2XConst.V2X_CARD_TYPE_NOVELTY);
|
||||
break;
|
||||
case ServiceConst.CARD_TYPE_ROAD_CONDITION:
|
||||
options.owner(V2XConst.V2X_CARD_TYPE_ROAD_CONDITION);
|
||||
break;
|
||||
case V2XConst.V2X_MARKER_SPECIAL_CAR:
|
||||
options.owner(V2XConst.V2X_MARKER_SPECIAL_CAR);
|
||||
break;
|
||||
case V2XConst.V2X_MARKER_LIVE_CAR:
|
||||
options.owner(V2XConst.V2X_MARKER_LIVE_CAR);
|
||||
break;
|
||||
default:
|
||||
options.owner(markerShowEntity.getMarkerType());
|
||||
break;
|
||||
}
|
||||
|
||||
IMogoMarker marker = null;
|
||||
Bitmap bitmap;
|
||||
if (markerShowEntity.getMarkerType().equals(ServiceConst.CARD_TYPE_USER_DATA)
|
||||
|| markerShowEntity.getMarkerType().equals(V2XConst.V2X_MARKER_SPECIAL_CAR)
|
||||
|| markerShowEntity.getMarkerType().equals(V2XConst.V2X_MARKER_LIVE_CAR)
|
||||
|| markerShowEntity.getMarkerType().equals(V2XConst.V2X_MARKER_EXPRESS)
|
||||
) {
|
||||
bitmap = V2XMarkerAdapter.getV2XCarMarkerView(context, markerShowEntity);
|
||||
options.icon(bitmap);
|
||||
IMogoMarkerManager markerManager = BridgeApi.INSTANCE.marker();
|
||||
if (markerManager != null) {
|
||||
marker = markerManager.addMarker(markerShowEntity.getMarkerType(), options);
|
||||
}
|
||||
} else {
|
||||
IMarkerView iMarkerView = MapMarkerAdapter.getMarkerView(context, markerShowEntity, options);
|
||||
bitmap = ViewUtils.fromView(iMarkerView.getView());
|
||||
options.icon(bitmap);
|
||||
IMogoMarkerManager markerManager = BridgeApi.INSTANCE.marker();
|
||||
if (markerManager != null) {
|
||||
marker = markerManager.addMarker(markerShowEntity.getMarkerType(), options);
|
||||
}
|
||||
|
||||
iMarkerView.setMarker(marker);
|
||||
}
|
||||
//marker.setOnMarkerClickListener(clickListener);
|
||||
} else {
|
||||
Logger.e(MODULE_NAME, "Location 必须进行初始化!!!!!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMarker openMarker(Context context, IMogoMarker currentMarker) {
|
||||
|
||||
@@ -63,56 +63,16 @@ public class MoGoV2XStatusManager implements IMoGoV2XStatusManager {
|
||||
return get_bool_val(V2XStatusDescriptor.RoadEventWindow_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRoadLiveCarWindowShow() {
|
||||
return get_bool_val(V2XStatusDescriptor.RoadLiveCarWindow_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOtherSeekHelpWindowShow() {
|
||||
return get_bool_val(V2XStatusDescriptor.OtherSeekHelpWindow_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMeSeekHelpButtonShow() {
|
||||
return get_bool_val(V2XStatusDescriptor.MeSeekHelpButton_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOtherSeekHelpPOIShow() {
|
||||
return get_bool_val(V2XStatusDescriptor.OtherSeekHelpPOI_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isV2XAnimationShow() {
|
||||
return get_bool_val(V2XStatusDescriptor.V2XAnimationWindow_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeftLiveVideoShow() {
|
||||
return get_bool_val(V2XStatusDescriptor.LiveCarWindow_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPushWindowShow() {
|
||||
return get_bool_val(V2XStatusDescriptor.PushWindow_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPushPOIShow() {
|
||||
return get_bool_val(V2XStatusDescriptor.PushWindowPOI_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFatigueDrivingWindowShow() {
|
||||
return get_bool_val(V2XStatusDescriptor.FatigueDrivingWindow_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEventPanelWindowShow() {
|
||||
return get_bool_val(V2XStatusDescriptor.EventPanelWindow_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRoadEventPOIShow(String tag, boolean show) {
|
||||
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
|
||||
@@ -152,24 +112,6 @@ public class MoGoV2XStatusManager implements IMoGoV2XStatusManager {
|
||||
recordStatusModifier(tag, V2XStatusDescriptor.OtherSeekHelpWindow_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMeSeekHelpButtonShow(String tag, boolean show) {
|
||||
mStatus.put(V2XStatusDescriptor.MeSeekHelpButton_UI, show);
|
||||
invokeStatusChangedListener(V2XStatusDescriptor.MeSeekHelpButton_UI, show);
|
||||
recordStatusModifier(tag, V2XStatusDescriptor.MeSeekHelpButton_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOtherSeekHelpPOIShow(String tag, boolean show) {
|
||||
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
|
||||
if (statusManager != null) {
|
||||
statusManager.setV2XUIShow(V2XConst.MODULE_NAME, show);
|
||||
}
|
||||
mStatus.put(V2XStatusDescriptor.OtherSeekHelpPOI_UI, show);
|
||||
invokeStatusChangedListener(V2XStatusDescriptor.OtherSeekHelpPOI_UI, show);
|
||||
recordStatusModifier(tag, V2XStatusDescriptor.OtherSeekHelpPOI_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setV2XAnimationWindowShow(String tag, boolean show) {
|
||||
mStatus.put(V2XStatusDescriptor.V2XAnimationWindow_UI, show);
|
||||
@@ -213,40 +155,7 @@ public class MoGoV2XStatusManager implements IMoGoV2XStatusManager {
|
||||
recordStatusModifier(tag, V2XStatusDescriptor.FatigueDrivingWindow_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEventPanelWindowShow(String tag, boolean show) {
|
||||
mStatus.put(V2XStatusDescriptor.EventPanelWindow_UI, show);
|
||||
invokeStatusChangedListener(V2XStatusDescriptor.EventPanelWindow_UI, show);
|
||||
recordStatusModifier(tag, V2XStatusDescriptor.EventPanelWindow_UI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerStatusChangedListener(String tag, V2XStatusDescriptor descriptor, IMoGoV2XStatusChangedListener listener) {
|
||||
if (listener == null || descriptor == null) {
|
||||
return;
|
||||
}
|
||||
if (!mListeners.containsKey(descriptor)) {
|
||||
mListeners.put(descriptor, new ArrayList<>());
|
||||
}
|
||||
if (mListeners.get(descriptor) == null) {
|
||||
mListeners.put(descriptor, new ArrayList<>());
|
||||
}
|
||||
List<IMoGoV2XStatusChangedListener> listeners = mListeners.get(descriptor);
|
||||
if (listeners != null) {
|
||||
listeners.add(listener);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterStatusChangedListener(String tag, V2XStatusDescriptor descriptor, IMoGoV2XStatusChangedListener listener) {
|
||||
List<IMoGoV2XStatusChangedListener> listeners = mListeners.get(descriptor);
|
||||
if (listeners != null) {
|
||||
listeners.remove(listener);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* 调用所有存储的监听
|
||||
*
|
||||
* @param descriptor
|
||||
|
||||
Reference in New Issue
Block a user