[Upload]
移除分享上报模块依赖,代码保留 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -97,7 +97,6 @@ dependencies {
|
||||
api project(':foudations:mogo-commons')
|
||||
api project(':modules:mogo-module-common')
|
||||
api project(':modules:mogo-module-service')
|
||||
api project(':modules:mogo-module-share')
|
||||
api project(':modules:mogo-module-extensions')
|
||||
api project(':modules:mogo-module-adas')
|
||||
api project(':modules:mogo-module-carchatting')
|
||||
|
||||
@@ -31,7 +31,6 @@ import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.common.constants.HostConst;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.share.constant.ShareConstants;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.cloud.socket.IMogoLifecycleListener;
|
||||
import com.mogo.test.crashreport.CrashReportConstants;
|
||||
@@ -306,18 +305,10 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
}
|
||||
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MapApiPath.PATH, "CustomMapApiBuilder"));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(ShareConstants.TAG, ShareConstants.MODEL_NAME));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_TANLU_API, "TanluApi"));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_TRAFFIC_UPLOAD, "TrafficUpload"));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_SHARE, "ShareControl"));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(ServiceConst.PATH_REFRESH_STRATEGY, ServiceConst.PATH_REFRESH_STRATEGY));
|
||||
// MogoModulePaths.addBaseModule(new MogoModule(V2XConst.PATH_V2X_UI, V2XConst.MODULE_NAME));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_STRATEGY_SHARE, "StrategyShare"));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GAODE_AIMLESS_SHARE, "GaoDeAimlessShare"));
|
||||
|
||||
//mogo deva tools
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_DEVA_TOOLS, "IMoGoDevaToolsProvider"));
|
||||
|
||||
// 域控制器模块(新)
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AUTO_PILOT, "IMoGoAutoPilotProvider"));
|
||||
// OBU 模块
|
||||
@@ -326,7 +317,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AI_MONITORING, "IMoGoMonitoringProvider"));
|
||||
// 云公告发布
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AI_NOTICE, "IMoGoNoticeProvider"));
|
||||
|
||||
// V2X 模块
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_V2X_MODULE, "V2XProvider"));
|
||||
// 自动驾驶系统检测模块
|
||||
|
||||
@@ -410,11 +410,6 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
// 存储本地,出行动态作展示
|
||||
saveLocalStory(V2XTypeEnum.ALERT_ROAD_WARNING, v2XRoadEventEntity.noveltyInfo)
|
||||
|
||||
//如果poiType是道路拥堵,则调用接口查询拥堵状态
|
||||
val poiType = v2XRoadEventEntity.poiType
|
||||
if (poiType != null && poiType == FOURS_BLOCK_UP.poiType) {
|
||||
BridgeApi.trafficUpload()?.verifyCurrentTrafficStatus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -193,8 +193,9 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
|
||||
TextView share = itemView.findViewById(R.id.share_event_button);
|
||||
share.setOnClickListener(view -> {
|
||||
V2XEventPanelFragment.Companion.getInstance().hidePanel();
|
||||
mApis.getShareManager().showShareDialog();
|
||||
// TODO
|
||||
// V2XEventPanelFragment.Companion.getInstance().hidePanel();
|
||||
// mApis.getShareManager().showShareDialog();
|
||||
});
|
||||
|
||||
TextView refresh = itemView.findViewById(R.id.refresh_button);
|
||||
|
||||
@@ -11,7 +11,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.function.v2x.R;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
@@ -27,8 +26,6 @@ import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.common.enums.EventTypeEnum;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceManager;
|
||||
import com.mogo.service.analytics.IMogoAnalytics;
|
||||
import com.mogo.service.share.IMogoTanluProvider;
|
||||
import com.mogo.service.share.TanluUploadParams;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -181,19 +178,19 @@ public class V2XEventUgcVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
unRegisterVoice();
|
||||
|
||||
if (status == 1) {
|
||||
// 上报事故
|
||||
TanluUploadParams params =
|
||||
new TanluUploadParams(
|
||||
mNoveltyInfo.getPoiType(),
|
||||
IMogoTanluProvider.UPLOAD_FROM_STRATEGY_UGC,
|
||||
mNoveltyInfo.getInfoIdInt(),
|
||||
new MogoLatLng(mNoveltyInfo.getLocation().getLat(),
|
||||
mNoveltyInfo.getLocation().getLon())
|
||||
);
|
||||
IMogoTanluProvider tanlu = BridgeApi.INSTANCE.tanlu();
|
||||
if (tanlu != null) {
|
||||
tanlu.uploadRoadCondition(params);
|
||||
}
|
||||
// // 上报事故
|
||||
// TanluUploadParams params =
|
||||
// new TanluUploadParams(
|
||||
// mNoveltyInfo.getPoiType(),
|
||||
// IMogoTanluProvider.UPLOAD_FROM_STRATEGY_UGC,
|
||||
// mNoveltyInfo.getInfoIdInt(),
|
||||
// new MogoLatLng(mNoveltyInfo.getLocation().getLat(),
|
||||
// mNoveltyInfo.getLocation().getLon())
|
||||
// );
|
||||
// IMogoTanluProvider tanlu = BridgeApi.INSTANCE.tanlu();
|
||||
// if (tanlu != null) {
|
||||
// tanlu.uploadRoadCondition(params);
|
||||
// }
|
||||
dataStatistics(1);
|
||||
} else if (status == 0) {
|
||||
dataStatistics(2);
|
||||
|
||||
@@ -106,8 +106,6 @@ internal object BridgeApi {
|
||||
|
||||
fun windowManager() = apis?.windowManagerApi
|
||||
|
||||
fun tanlu() = apis?.tanluApi
|
||||
|
||||
fun displayEffects() = apis?.displayEffectsManager
|
||||
|
||||
fun intentManager() = apis?.intentManagerApi
|
||||
@@ -116,9 +114,5 @@ internal object BridgeApi {
|
||||
|
||||
fun locationClient() = apis?.mapServiceApi?.getSingletonLocationClient(context())
|
||||
|
||||
fun share() = apis?.shareManager
|
||||
|
||||
fun markerService() = apis?.markerService
|
||||
|
||||
fun trafficUpload() = apis?.trafficUploadApi
|
||||
}
|
||||
@@ -4,33 +4,31 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.share
|
||||
import com.mogo.eagle.core.function.v2x.events.fragment.V2XEventPanelFragment.Companion.getInstance
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.v2xStatus
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.eagle.core.function.v2x.events.fragment.presenter.ScenarioHistoryPresenter
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.function.v2x.events.adapter.V2XScenarioHistoryAdapter
|
||||
import com.mogo.module.common.entity.V2XHistoryScenarioData
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusChangedListener
|
||||
import com.mogo.module.common.view.SpacesItemDecoration
|
||||
import com.mogo.eagle.core.function.v2x.events.view.V2XListEmptyView.OnControlListener
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusDescriptor
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.V2XUtils
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.function.v2x.R.dimen
|
||||
import com.mogo.eagle.core.function.v2x.R.layout
|
||||
import com.mogo.eagle.core.function.v2x.events.adapter.V2XScenarioHistoryAdapter
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.v2xStatus
|
||||
import com.mogo.eagle.core.function.v2x.events.fragment.presenter.ScenarioHistoryPresenter
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusChangedListener
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusDescriptor
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusDescriptor.EventPanelWindow_UI
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.V2XSQLiteUtils
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.V2XUtils
|
||||
import com.mogo.eagle.core.function.v2x.events.view.V2XListEmptyView.OnControlListener
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import com.mogo.module.common.entity.V2XHistoryScenarioData
|
||||
import com.mogo.module.common.view.SpacesItemDecoration
|
||||
import kotlinx.android.synthetic.main.module_v2x_event_panel_fragment_scenario_history.*
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import java.util.ArrayList
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* 出行动态,V2X 提示过的场景历史
|
||||
@@ -71,11 +69,12 @@ class V2XScenarioHistoryFragment : MvpFragment<V2XScenarioHistoryFragment?, Scen
|
||||
private fun initListener() {
|
||||
viewEmpty.setOnControlListener(object : OnControlListener {
|
||||
override fun onShearClick() {
|
||||
val share = share()
|
||||
if (share != null) {
|
||||
share.showShareDialog()
|
||||
getInstance().hidePanel()
|
||||
}
|
||||
// TODO
|
||||
// val share = share()
|
||||
// if (share != null) {
|
||||
// share.showShareDialog()
|
||||
// getInstance().hidePanel()
|
||||
// }
|
||||
}
|
||||
|
||||
override fun onRefreshClick() {}
|
||||
|
||||
@@ -156,9 +156,10 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
if (id == R.id.tv_main_share) {
|
||||
//弹出框面板消失,出现分享弹框
|
||||
V2XEventPanelFragment.Companion.getInstance().hidePanel();
|
||||
if (mApis != null && mApis.getShareManager() != null) {
|
||||
mApis.getShareManager().showShareDialog();
|
||||
}
|
||||
// TODO
|
||||
// if (mApis != null && mApis.getShareManager() != null) {
|
||||
// mApis.getShareManager().showShareDialog();
|
||||
// }
|
||||
} else if (id == R.id.tv_main_refresh || id == R.id.tv_top_refresh) { //刷新
|
||||
initData();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XPushMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.service.share.IMogoTrafficUploadProvider;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.zhidao.carchattingprovider.ICarsChattingProvider;
|
||||
import com.zhidao.carchattingprovider.MogoDriverInfo;
|
||||
@@ -151,12 +150,6 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, messageEntity);
|
||||
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
|
||||
} else if (sceneType == 15) {// 交通状况查询
|
||||
|
||||
IMogoTrafficUploadProvider provider = BridgeApi.INSTANCE.trafficUpload();
|
||||
if (provider != null) {
|
||||
provider.verifyCurrentTrafficStatus();
|
||||
}
|
||||
} /*else if (sceneType == 16) {//触发基于目的地预测的线路推荐
|
||||
V2XRefreshModel model = BridgeApi.INSTANCE.refreshModel();
|
||||
model.
|
||||
|
||||
@@ -166,13 +166,6 @@ public class MogoServicePaths {
|
||||
@Deprecated
|
||||
public static final String PATH_MARKER_SERVICE = "/mogomarker/api";
|
||||
|
||||
/**
|
||||
* 其他模块调用分享框
|
||||
*/
|
||||
@Keep
|
||||
@Deprecated
|
||||
public static final String PATH_SHARE = "/extensions/share";
|
||||
|
||||
/**
|
||||
* 事件面板
|
||||
*/
|
||||
@@ -201,41 +194,6 @@ public class MogoServicePaths {
|
||||
@Deprecated
|
||||
public static final String PATH_AGREEMENT = "/agreement/showFragment";
|
||||
|
||||
/**
|
||||
* 探路api
|
||||
*/
|
||||
@Keep
|
||||
@Deprecated
|
||||
public static final String PATH_TANLU_API = "/tanlulib/api";
|
||||
|
||||
/**
|
||||
* 策略上报
|
||||
*/
|
||||
@Keep
|
||||
@Deprecated
|
||||
public static final String PATH_STRATEGY_SHARE = "/share/strategy";
|
||||
|
||||
/**
|
||||
* 分享模块中,交通状况服务上报
|
||||
*/
|
||||
@Keep
|
||||
@Deprecated
|
||||
public static final String PATH_TRAFFIC_UPLOAD = "/share/traffic";
|
||||
|
||||
/**
|
||||
* 高德地图巡航上报
|
||||
*/
|
||||
@Keep
|
||||
@Deprecated
|
||||
public static final String PATH_GAODE_AIMLESS_SHARE = "/share/gaodeAimless";
|
||||
|
||||
/**
|
||||
* 探路ui
|
||||
*/
|
||||
@Keep
|
||||
@Deprecated
|
||||
public static final String PATH_TANLU_UI_API = "/tanlu/ui";
|
||||
|
||||
/**
|
||||
* 在线好友面板
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
:core:function-impl:mogo-core-function-check
|
||||
:services:mogo-service
|
||||
:core:function-impl:mogo-core-function-smp
|
||||
:modules:mogo-module-share
|
||||
:modules:mogo-module-extensions
|
||||
:modules:mogo-module-main
|
||||
:core:function-impl:mogo-core-function-autopilot
|
||||
|
||||
@@ -68,7 +68,6 @@ dependencies {
|
||||
api rootProject.ext.dependencies.mogocommons
|
||||
api rootProject.ext.dependencies.mogoserviceapi
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.moduleshare
|
||||
implementation rootProject.ext.dependencies.moduleservice
|
||||
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
@@ -81,7 +80,6 @@ dependencies {
|
||||
api project(":foudations:mogo-commons")
|
||||
api project(':services:mogo-service-api')
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':modules:mogo-module-share')
|
||||
implementation project(':modules:mogo-module-service')
|
||||
|
||||
implementation project(':core:mogo-core-utils')
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SERVER_SHOW_DAY_COUNT;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.ArrayMap;
|
||||
|
||||
@@ -64,16 +62,7 @@ public class EntrancePresenter extends Presenter<EntranceView> {
|
||||
public void onSuccess(CommonConfigResponse config) {
|
||||
Logger.d(TAG, "getCommonConfig onSuccess -----> ");
|
||||
if (config != null && config.result != null) {
|
||||
CommonConfig.Speech speech = config.result.speech;
|
||||
CommonConfig.ReportStrategy strategy = config.result.reportStrategy;
|
||||
if (speech != null) {
|
||||
Logger.d(TAG,
|
||||
"getCommonConfig onSuccess speech.count = " + speech.count);
|
||||
SharedPrefsMgr.getInstance(getContext()).putInt(KEY_SERVER_SHOW_DAY_COUNT, speech.count);
|
||||
} else {
|
||||
Logger.e(TAG, "getCommonConfig onSuccess speech == null ");
|
||||
}
|
||||
|
||||
if (strategy != null) {
|
||||
Logger.d(TAG,
|
||||
"getCommonConfig onSuccess strategy.open = " + strategy.open);
|
||||
|
||||
@@ -185,7 +185,7 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
if (mServiceApis == null) {
|
||||
mServiceApis = MogoApisHandler.getInstance().getApis();
|
||||
}
|
||||
mServiceApis.getShareManager().resetContext(this);
|
||||
//mServiceApis.getShareManager().resetContext(this);
|
||||
|
||||
mMogoStatusManager = mServiceApis.getStatusManagerApi();
|
||||
mMogoStatusManager.setMainPageLaunchedStatus(TAG, true);
|
||||
@@ -425,7 +425,6 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
MogoModulesManager.getInstance().onDestroy();
|
||||
SchemeIntent.getInstance().clear();
|
||||
FloatingViewHandler.clear();
|
||||
mServiceApis.getShareManager().releaseContext();
|
||||
ProcessUtils.killAllBackgroundProcesses();
|
||||
}
|
||||
|
||||
|
||||
@@ -119,10 +119,10 @@ public class SchemeIntent implements IMogoStatusChangedListener {
|
||||
break;
|
||||
case "/main/share":
|
||||
Logger.d(TAG, "收到打开分享框的scheme,准备打开分享框");
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("from", "1");
|
||||
mApis.getAnalyticsApi().track("v2x_share_click", properties);
|
||||
mApis.getShareManager().showShareDialog();
|
||||
// Map<String, Object> properties = new HashMap<>();
|
||||
// properties.put("from", "1");
|
||||
// mApis.getAnalyticsApi().track("v2x_share_click", properties);
|
||||
// mApis.getShareManager().showShareDialog();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -151,9 +151,6 @@ public class SchemeIntent implements IMogoStatusChangedListener {
|
||||
case TYPE_LAUNCH:
|
||||
handleLaunchIntent(target);
|
||||
break;
|
||||
case TYPE_SEARCH_ROAD_CONDITION:
|
||||
handleSearchRoadCondition(target);
|
||||
break;
|
||||
case TYPE_SHOW_ONLINE_CAR_PANEL:
|
||||
handleShowOnlineCarPanel(target);
|
||||
break;
|
||||
@@ -172,17 +169,6 @@ public class SchemeIntent implements IMogoStatusChangedListener {
|
||||
}
|
||||
}
|
||||
|
||||
private void handleSearchRoadCondition(Uri target) {
|
||||
if (mApis == null) {
|
||||
return;
|
||||
}
|
||||
Log.d("TanluManager", "handleSearchRoadCondition intentStr =" + target.getQueryParameter("intentStr") + ">> data = " + target.getQueryParameter("data")
|
||||
+ "-----city = " + target.getQueryParameter("city") + "----keywords = " + target.getQueryParameter("keywords"));
|
||||
mApis.getTanluUiApi().searchRoadCondition(target.getQueryParameter("intentStr"),
|
||||
target.getQueryParameter("data"), target.getQueryParameter("city"),
|
||||
target.getQueryParameter("keywords"));
|
||||
}
|
||||
|
||||
private void handleLaunchIntent(Uri uri) {
|
||||
String type = uri.getQueryParameter("channelType");
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
|
||||
@@ -47,7 +47,6 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
Logger.d(TAG, "5秒已过,启动基础服务……");
|
||||
loadBaseModules();
|
||||
startTanluService();
|
||||
initADAS();
|
||||
HdMapBuildConfig.isMapLoaded = true;
|
||||
}, 5_000L
|
||||
@@ -85,16 +84,6 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
MogoModulesManager.getInstance().loadBaseModule();
|
||||
}
|
||||
|
||||
private void startTanluService() {
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
Logger.d(TAG, "startTanluService ---------- ");
|
||||
if (mServiceApis != null && mServiceApis.getTanluApi() != null) {
|
||||
mServiceApis.getTanluApi().startTanluService();
|
||||
}
|
||||
}, 2_000L
|
||||
);
|
||||
}
|
||||
|
||||
private void initADAS() {
|
||||
if (mServiceApis != null) {
|
||||
mServiceApis.getAdasControllerApi().init(AbsMogoApplication.getApp());
|
||||
|
||||
@@ -107,7 +107,7 @@ abstract class StatusChangedAdapter implements IMogoStatusChangedListener {
|
||||
}
|
||||
};
|
||||
}
|
||||
MogoApisHandler.getInstance().getApis().getShareManager().dismissShareDialog();
|
||||
//MogoApisHandler.getInstance().getApis().getShareManager().dismissShareDialog();
|
||||
MogoApisHandler.getInstance().getApis().getOnlineCarPanelApi().hidePanel();
|
||||
MogoApisHandler.getInstance().getApis().getEventPanelManager().hidePanel();
|
||||
if (mCarsChattingProvider == null) {
|
||||
|
||||
@@ -1,20 +1,5 @@
|
||||
package com.mogo.module.service.unwake;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
import com.mogo.service.intent.IMogoIntentManager;
|
||||
|
||||
import static com.mogo.module.service.unwake.GlobalUnwakeConst.UNWAKE_UPLOAD_REAL_TIME_TRAFFIC;
|
||||
import static com.mogo.module.service.unwake.GlobalUnwakeConst.UNWAKE_UPLOAD_ROAD_CONDITION;
|
||||
import static com.mogo.module.service.unwake.GlobalUnwakeConst.UPLOAD_REAL_TIME_TRAFFIC;
|
||||
@@ -27,6 +12,21 @@ import static com.mogo.module.service.unwake.GlobalUnwakeConst.VOICE_QUERY_HEART
|
||||
import static com.mogo.module.service.unwake.GlobalUnwakeConst.VOICE_QUERY_HISTORY_INDEX;
|
||||
import static com.mogo.module.service.unwake.GlobalUnwakeConst.VOICE_QUERY_SURROUNDING_INDEX;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
import com.mogo.service.intent.IMogoIntentManager;
|
||||
|
||||
/**
|
||||
* 全局免唤醒管理
|
||||
* 包括唤醒词指令和全局免唤醒词指令
|
||||
@@ -71,7 +71,8 @@ public class GlobalUnwakeManager implements IProvider, IMogoIntentListener, IMog
|
||||
case VOICE_CMD_SHARE_DIALOG_CLOSE:
|
||||
case VOICE_CMD_NO_REPLY_SHARE_DIALOG_CLOSE:
|
||||
case UNWAKE_UPLOAD_ROAD_CONDITION:
|
||||
MogoApisHandler.getInstance().getApis().getShareManager().onGlobalUnwake(intentStr, intent);
|
||||
//TODO
|
||||
// MogoApisHandler.getInstance().getApis().getShareManager().onGlobalUnwake(intentStr, intent);
|
||||
break;
|
||||
case VOICE_QUERY_HISTORY_INDEX:
|
||||
Log.d("语音指令","VOICE_QUERY_HISTORY_INDEX");
|
||||
@@ -110,7 +111,8 @@ public class GlobalUnwakeManager implements IProvider, IMogoIntentListener, IMog
|
||||
public void onCmdSelected(String cmd) {
|
||||
Logger.d(TAG, "收到免唤醒词指令: " + cmd);
|
||||
if (UNWAKE_UPLOAD_REAL_TIME_TRAFFIC.equals(cmd)) {
|
||||
MogoApisHandler.getInstance().getApis().getShareManager().onGlobalUnwake(cmd, null);
|
||||
//TODO
|
||||
// MogoApisHandler.getInstance().getApis().getShareManager().onGlobalUnwake(cmd, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,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;
|
||||
@@ -29,10 +28,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;
|
||||
@@ -64,11 +59,6 @@ public class MogoServiceApis implements IMogoServiceApis {
|
||||
return getApiInstance(IMogoSocketManager.class, MogoServicePaths.PATH_SOCKET_MANAGER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoWebSocketManager getWebSocketManagerApi(Context context) {
|
||||
return getApiInstance(IMogoWebSocketManager.class, MogoServicePaths.PATH_WEB_SOCKET_MANAGER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoFragmentManager getFragmentManagerApi() {
|
||||
return SingletonsHolder.get(IMogoFragmentManager.class);
|
||||
@@ -150,11 +140,6 @@ public class MogoServiceApis implements IMogoServiceApis {
|
||||
return getApiInstance(IMogoMarkerService.class, MogoServicePaths.PATH_MARKER_SERVICE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoShareManager getShareManager() {
|
||||
return getApiInstance(IMogoShareManager.class, MogoServicePaths.PATH_SHARE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEventPanelProvider getEventPanelManager() {
|
||||
return getApiInstance(IEventPanelProvider.class, MogoServicePaths.PATH_EVENT_PANEL);
|
||||
@@ -171,16 +156,6 @@ public class MogoServiceApis implements IMogoServiceApis {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IMogoTanluProvider getTanluApi() {
|
||||
return getApiInstance(IMogoTanluProvider.class, MogoServicePaths.PATH_TANLU_API);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoTanluUiProvider getTanluUiApi() {
|
||||
return getApiInstance(IMogoTanluUiProvider.class, MogoServicePaths.PATH_TANLU_UI_API);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoOnlineCarListPanelProvider getOnlineCarPanelApi() {
|
||||
return getApiInstance(IMogoOnlineCarListPanelProvider.class, MogoServicePaths.PATH_ONLINE_CAR_PANEL);
|
||||
@@ -191,12 +166,6 @@ public class MogoServiceApis implements IMogoServiceApis {
|
||||
return getApiInstance(IMogoMapFrameController.class, MogoServicePaths.PATH_MAP_FRAME_CONTROLLER);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IMogoTrafficUploadProvider getTrafficUploadApi() {
|
||||
return getApiInstance(IMogoTrafficUploadProvider.class, MogoServicePaths.PATH_TRAFFIC_UPLOAD);
|
||||
}
|
||||
|
||||
private static <T extends IProvider> T getApiInstance(Class<T> clazz, String path) {
|
||||
T inst = SingletonsHolder.get(clazz);
|
||||
if (inst == null) {
|
||||
|
||||
@@ -59,7 +59,6 @@ include ':libraries:mogo-map'
|
||||
include ':modules:mogo-module-adas'
|
||||
include ':modules:mogo-module-common'
|
||||
include ':modules:mogo-module-main'
|
||||
include ':modules:mogo-module-share'
|
||||
include ':modules:mogo-module-service'
|
||||
include ':modules:mogo-module-extensions'
|
||||
include ':modules:mogo-module-carchatting'
|
||||
|
||||
Reference in New Issue
Block a user