[Upload]
移除分享上报模块依赖,代码保留 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -8,7 +8,6 @@ import com.mogo.service.analytics.IMogoAnalytics;
|
||||
import com.mogo.service.cloud.location.IMogoLocationInfoService;
|
||||
import com.mogo.service.cloud.passport.IMogoPassportManager;
|
||||
import com.mogo.service.cloud.socket.IMogoSocketManager;
|
||||
import com.mogo.service.cloud.socket.IMogoWebSocketManager;
|
||||
import com.mogo.service.datamanager.IMogoDataManager;
|
||||
import com.mogo.service.eventpanel.IEventPanelProvider;
|
||||
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
@@ -20,10 +19,6 @@ import com.mogo.service.module.IMogoActionManager;
|
||||
import com.mogo.service.module.IMogoMarkerService;
|
||||
import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.service.share.IMogoShareManager;
|
||||
import com.mogo.service.share.IMogoTanluProvider;
|
||||
import com.mogo.service.share.IMogoTanluUiProvider;
|
||||
import com.mogo.service.share.IMogoTrafficUploadProvider;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.strategy.IMogoOnlineCarListPanelProvider;
|
||||
import com.mogo.service.strategy.IMogoRefreshStrategyController;
|
||||
@@ -54,11 +49,6 @@ public interface IMogoServiceApis extends IProvider {
|
||||
*/
|
||||
IMogoSocketManager getSocketManagerApi(Context context);
|
||||
|
||||
/**
|
||||
* 获取WebSocket操作api
|
||||
*/
|
||||
IMogoWebSocketManager getWebSocketManagerApi(Context context);
|
||||
|
||||
/**
|
||||
* 大而全的数据管理接口
|
||||
*
|
||||
@@ -166,13 +156,6 @@ public interface IMogoServiceApis extends IProvider {
|
||||
*/
|
||||
IMogoMarkerService getMarkerService();
|
||||
|
||||
/**
|
||||
* 其他模块调用分享框的显示和隐藏
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoShareManager getShareManager();
|
||||
|
||||
/**
|
||||
* 获取事件面板manager
|
||||
*
|
||||
@@ -194,21 +177,6 @@ public interface IMogoServiceApis extends IProvider {
|
||||
*/
|
||||
IMogoPassportManager getPassportManagerApi();
|
||||
|
||||
|
||||
/**
|
||||
* 获取探路服务
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoTanluProvider getTanluApi();
|
||||
|
||||
/**
|
||||
* 获取探路ui服务
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoTanluUiProvider getTanluUiApi();
|
||||
|
||||
/**
|
||||
* 在线车辆面板
|
||||
*
|
||||
@@ -216,12 +184,6 @@ public interface IMogoServiceApis extends IProvider {
|
||||
*/
|
||||
IMogoOnlineCarListPanelProvider getOnlineCarPanelApi();
|
||||
|
||||
/**
|
||||
* 获取交通状况服务
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoTrafficUploadProvider getTrafficUploadApi();
|
||||
|
||||
/**
|
||||
* 地图图层控制接口
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.mogo.service.share;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.voice.IMogoGlobalVoiceManager;
|
||||
|
||||
/**
|
||||
* 分享框管理接口
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public interface IMogoShareManager extends IProvider, IMogoGlobalVoiceManager {
|
||||
/**
|
||||
* 显示分享框
|
||||
*/
|
||||
void showShareDialog();
|
||||
|
||||
/**
|
||||
* 隐藏分享框
|
||||
*/
|
||||
void dismissShareDialog();
|
||||
|
||||
/**
|
||||
* 重置一下上下文,普通dialog需要activity的上下文
|
||||
* @param context 待重置的上下文
|
||||
*/
|
||||
void resetContext(Context context);
|
||||
|
||||
void releaseContext();
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
package com.mogo.service.share;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
|
||||
/**
|
||||
* 探路情报相关接口
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public interface IMogoTanluProvider extends IProvider {
|
||||
/**
|
||||
* 拥堵
|
||||
*/
|
||||
String TYPE_BLOCK = "10007";
|
||||
/**
|
||||
* 交通检查
|
||||
*/
|
||||
String TYPE_TRAFFIC_CHECK = "10002";
|
||||
/**
|
||||
* 封路
|
||||
*/
|
||||
String TYPE_CLOSURE = "10003";
|
||||
/**
|
||||
* 事故
|
||||
*/
|
||||
String TYPE_ACCIDENT = "10013";
|
||||
/**
|
||||
* 实时路况
|
||||
*/
|
||||
String TYPE_REAL_TIME_TRAFFIC = "10015";
|
||||
/**
|
||||
* 道路积水
|
||||
*/
|
||||
String TYPE_STAGNANT_WATER = "10008";
|
||||
/**
|
||||
* 道路结冰
|
||||
*/
|
||||
String TYPE_ROAD_ICY = "10011";
|
||||
/**
|
||||
* 浓雾
|
||||
*/
|
||||
String TYPE_DENSE_FOG = "10010";
|
||||
/**
|
||||
* 道路施工
|
||||
*/
|
||||
String TYPE_ROAD_CONSTRUCTION = "10006";
|
||||
|
||||
/**
|
||||
* 故障求助
|
||||
*/
|
||||
String TYPE_SEEK_HELP = "9999";
|
||||
|
||||
/**
|
||||
* 用户手点上报
|
||||
*/
|
||||
String UPLOAD_FROM_USER = "2";
|
||||
/**
|
||||
* 用户语音上报
|
||||
*/
|
||||
String UPLOAD_FROM_VOICE = "1";
|
||||
/**
|
||||
* 数据策略:拥堵自动上报
|
||||
*/
|
||||
String UPLOAD_FROM_STRATEGY_BLOCK_AUTO = "3";
|
||||
/**
|
||||
* 数据策略:已有事件云端校验
|
||||
*/
|
||||
String UPLOAD_FROM_STRATEGY_CLOUD_CHECK = "4";
|
||||
/**
|
||||
* 数据策略:交通事故上报
|
||||
*/
|
||||
String UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO = "5";
|
||||
|
||||
/**
|
||||
* 数据策略:UGC上报
|
||||
*/
|
||||
String UPLOAD_FROM_STRATEGY_UGC = "6";
|
||||
|
||||
|
||||
/**
|
||||
* 策略上报集合
|
||||
*/
|
||||
String[] STRATEGY_UPLOAD_TYPE_ARRAY = new String[]{UPLOAD_FROM_STRATEGY_BLOCK_AUTO,
|
||||
UPLOAD_FROM_STRATEGY_CLOUD_CHECK, UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO};
|
||||
|
||||
/**
|
||||
* 默认视频抓取时长
|
||||
*/
|
||||
int DEFAULT_VIDEO_DURATION = 10;
|
||||
|
||||
/**
|
||||
* 上传情报
|
||||
*
|
||||
* @param params 情报类型
|
||||
*/
|
||||
void uploadRoadCondition(TanluUploadParams params);
|
||||
|
||||
/**
|
||||
* 开启探路业务服务
|
||||
*/
|
||||
void startTanluService();
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.mogo.service.share;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* 探路相关ui provider
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public interface IMogoTanluUiProvider extends IProvider {
|
||||
/**
|
||||
* 搜索道路事件接口,当前只在应用在后台时,收到搜索相关唤醒词指令,需跳转前台时使用
|
||||
* @param intentStr action
|
||||
* @param data 思必驰相关事件
|
||||
* @param city 同行者-xx堵不堵-北京
|
||||
* @param keywords 同行者-xx堵不堵-中关村
|
||||
*/
|
||||
void searchRoadCondition(String intentStr, String data, String city, String keywords);
|
||||
|
||||
/**
|
||||
* 分享成功,在界面上绘制分享的poi点,只是用于打点,并且这个点无法点击,所以没有特别详细的信息
|
||||
* @param poiType 事件类型
|
||||
* @param location 事件坐标
|
||||
*/
|
||||
void shareSuccess(String poiType, MogoLatLng location);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package com.mogo.service.share;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
|
||||
public interface IMogoTrafficUploadProvider extends IProvider {
|
||||
|
||||
/**
|
||||
* 验证当前交通状况并上报
|
||||
*/
|
||||
void verifyCurrentTrafficStatus();
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
package com.mogo.service.share;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* 探路事件上报参数封装
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class TanluUploadParams {
|
||||
/**
|
||||
* 事件类型
|
||||
*
|
||||
* 参考 {@link IMogoTanluProvider#TYPE_BLOCK}
|
||||
*/
|
||||
private String eventType;
|
||||
/**
|
||||
* 上报类型
|
||||
*
|
||||
* 参考 {@link IMogoTanluProvider#UPLOAD_FROM_USER}
|
||||
*/
|
||||
private String fromType;
|
||||
/**
|
||||
* 视频时长
|
||||
*/
|
||||
private int duration = IMogoTanluProvider.DEFAULT_VIDEO_DURATION;
|
||||
|
||||
/**
|
||||
* 针对策略上报新增字段,用于车辆经过事故事件上报时,记录经过的事故事件id
|
||||
*/
|
||||
private long parentId = 0;
|
||||
/**
|
||||
* 针对策略上报新增字段,用于车辆经过事故事件上报时,记录触发围栏时的经纬度坐标
|
||||
*/
|
||||
private MogoLatLng location = new MogoLatLng(0, 0);
|
||||
|
||||
public TanluUploadParams(String eventType){
|
||||
this(eventType, IMogoTanluProvider.UPLOAD_FROM_USER);
|
||||
}
|
||||
|
||||
public TanluUploadParams(String eventType, String fromType) {
|
||||
if (eventType == null) {
|
||||
eventType = IMogoTanluProvider.TYPE_BLOCK;
|
||||
}
|
||||
if (fromType == null) {
|
||||
fromType = IMogoTanluProvider.UPLOAD_FROM_USER;
|
||||
}
|
||||
this.eventType = eventType;
|
||||
this.fromType = fromType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 针对策略上报新增构造方法,方便传入parentId和location
|
||||
* @param eventType 事件类型
|
||||
* @param fromType 触发类型,是手动还是被动
|
||||
* @param parentId 经过事件id
|
||||
* @param location 触发围栏的坐标
|
||||
*/
|
||||
public TanluUploadParams(String eventType, String fromType, long parentId,
|
||||
MogoLatLng location) {
|
||||
this.eventType = eventType;
|
||||
this.fromType = fromType;
|
||||
this.parentId = parentId;
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getEventType() {
|
||||
return eventType;
|
||||
}
|
||||
|
||||
public void setEventType(String eventType) {
|
||||
this.eventType = eventType;
|
||||
}
|
||||
|
||||
public String getFromType() {
|
||||
return fromType;
|
||||
}
|
||||
|
||||
public void setFromType(String fromType) {
|
||||
this.fromType = fromType;
|
||||
}
|
||||
|
||||
public int getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public void setDuration(int duration) {
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public long getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(long parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public MogoLatLng getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(MogoLatLng location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TanluUploadParams{" +
|
||||
"eventType='" + eventType + '\'' +
|
||||
", fromType='" + fromType + '\'' +
|
||||
", duration=" + duration +
|
||||
", parentId='" + parentId + '\'' +
|
||||
", location=" + location +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user