fix bug of invoke trafficUpload

This commit is contained in:
unknown
2020-11-09 20:48:48 +08:00
parent 7c9317bad4
commit 8b59221f71
2 changed files with 11 additions and 9 deletions

View File

@@ -20,7 +20,6 @@ import com.mogo.utils.network.utils.GsonUtil;
import java.util.HashMap;
import java.util.Map;
import static com.mogo.module.common.entity.MarkerPoiTypeEnum.FOURS_BLOCK_UP;
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
/**
@@ -72,11 +71,6 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
close();
}
}
//如果poiType是道路拥堵则调用接口查询拥堵状态
String poiType = v2XMessageEntity.getContent().getPoiType();
if(poiType != null && poiType.equals(FOURS_BLOCK_UP)){
V2XServiceManager.getIMogoTrafficUploadProvider().verifyCurrentTrafficStatus();
}
} catch (Exception e) {
e.printStackTrace();
}
@@ -90,7 +84,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
boolean onlyShow = getV2XMessageEntity().isOnlyShow();
if (onlyShow == false){
if (onlyShow == false) {
// 设置TTS
getV2XMessageEntity().getContent().getTts(false);
// 广播给ADASzzz
@@ -204,7 +198,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
public void onViewAdded(View view) {
Logger.d(MODULE_NAME, "展示 Window 动画结束");
if (V2XServiceManager.getMoGoStatusManager().isMainPageLaunched()) {
if (getV2XMessageEntity() != null && getV2XMessageEntity().isNeedAddLine() == true){
if (getV2XMessageEntity() != null && getV2XMessageEntity().isNeedAddLine() == true) {
drawPOI();
}
}

View File

@@ -33,6 +33,7 @@ import com.mogo.utils.logger.Logger;
import java.util.ArrayList;
import java.util.List;
import static com.mogo.module.common.entity.MarkerPoiTypeEnum.FOURS_BLOCK_UP;
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
/**
@@ -168,12 +169,19 @@ public class V2XRoadEventWindow extends RelativeLayout
if (v2XRoadEventEntity != null) {
// 道路事件行驶到了50米附近弹出事件纠错框给用户
//Logger.d(MODULE_NAME, "V2X===道路事件:" + v2XRoadEventEntity);
//如果poiType是道路拥堵则调用接口查询拥堵状态
String poiType = v2XRoadEventEntity.getPoiType();
if(poiType != null && poiType.equals(FOURS_BLOCK_UP)){
V2XServiceManager.getIMogoTrafficUploadProvider().verifyCurrentTrafficStatus();
}
// 进行类型分发
switch (v2XRoadEventEntity.getPoiType()) {
case V2XPoiTypeEnum.TRAFFIC_CHECK: // 交通检查
case V2XPoiTypeEnum.ROAD_CLOSED://封路
case V2XPoiTypeEnum.FOURS_ROAD_WORK://施工
case V2XPoiTypeEnum.FOURS_BLOCK_UP://拥堵
case FOURS_BLOCK_UP://拥堵
case V2XPoiTypeEnum.FOURS_PONDING://积水
case V2XPoiTypeEnum.FOURS_FOG://浓雾
case V2XPoiTypeEnum.FOURS_ICE://结冰