移除分享上报模块依赖,代码保留

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-01-21 20:27:48 +08:00
parent 7c48fe0aa6
commit 66e4b43654
26 changed files with 62 additions and 530 deletions

View File

@@ -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')

View File

@@ -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"));
// 自动驾驶系统检测模块

View File

@@ -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()
}
}
}

View File

@@ -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);

View File

@@ -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);

View File

@@ -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
}

View File

@@ -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() {}

View File

@@ -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();
}

View File

@@ -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.