Merge branch 'qa_1.1.8' into qa_1.1.8_easy_mode

This commit is contained in:
董宏宇
2020-12-04 18:00:49 +08:00
2 changed files with 17 additions and 5 deletions

View File

@@ -27,6 +27,7 @@ import com.mogo.module.v2x.utils.DrivingDirectionUtils;
import com.mogo.module.v2x.utils.LocationUtils;
import com.mogo.module.v2x.utils.MarkerUtils;
import com.mogo.module.v2x.utils.TrackUtils;
import com.mogo.module.v2x.utils.V2XSQLiteUtils;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.network.utils.GsonUtil;
@@ -169,6 +170,10 @@ public class V2XLocationListener implements IMogoLocationListener, CarStatusList
v2XMessageEntity.setShowState(true);
V2XScenarioManager.getInstance().handlerMessage(v2XMessageEntity);
// 存储本地,出行动态作展示
saveLocalStory(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING,
v2XRoadEventEntity.getNoveltyInfo());
//如果poiType是道路拥堵则调用接口查询拥堵状态
String poiType = v2XRoadEventEntity.getPoiType();
if(poiType != null && poiType.equals(FOURS_BLOCK_UP)){
@@ -306,4 +311,16 @@ public class V2XLocationListener implements IMogoLocationListener, CarStatusList
V2XServiceManager.getMogoAnalytics().track(V2XConst.V2X_ROAD_SHOW, properties);
}
/**
* 存储本地数据
*
* @param markerExploreWay 要存储的场景
*/
public void saveLocalStory(int scenarioType, Object markerExploreWay) {
try {
V2XSQLiteUtils.saveLocalStory(scenarioType,markerExploreWay);
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@@ -20,8 +20,6 @@ import com.mogo.utils.network.utils.GsonUtil;
import java.util.HashMap;
import java.util.Map;
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
/**
* author : donghongyu
* e-mail : 1358506549@qq.com
@@ -93,9 +91,6 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
getV2XMessageEntity().getContent());
}
saveLocalStory(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING,
getV2XMessageEntity().getContent().getNoveltyInfo());
if (V2XServiceManager.getMoGoStatusManager().isMainPageOnResume()) {
showWindow();
}