From 93d6b4a0214af90c3e8cee92e9d5246ea60724f8 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Tue, 25 Jan 2022 21:18:25 +0800 Subject: [PATCH] =?UTF-8?q?[Upload]=20=E5=88=A0=E9=99=A4=E7=9B=AE=E7=9A=84?= =?UTF-8?q?=E5=9C=B0=E8=BD=A6=E5=8F=8B=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../function/hmi/ui/tools/AutoPilotBadCase.kt | 6 +- .../function/main/MainMoGoApplication.java | 7 +- .../function/v2x/events/bridge/BridgeApi.kt | 2 - .../scenario/impl/V2XScenarioManager.java | 11 +- .../core/data/constants/MogoServicePaths.java | 7 - .../com/mogo/eagle/core/network/HttpDns.java | 17 -- .../core/network/MoGoRetrofitFactory.java | 19 ++ .../mogo/eagle/core/network/NetConfig.java | 10 - .../eagle/core/network/RetrofitFactory.java | 18 -- .../mogo/commons/network/NetConfigUtils.java | 1 - .../mogo/map/impl/custom/AMapViewWrapper.java | 5 - .../map/impl/custom/CustomMapApiBuilder.java | 8 +- .../module/carchatting/biz/CallChatCenter.kt | 1 - .../com/mogo/module/main/MainActivity.java | 5 - .../com/mogo/module/main/SchemeIntent.java | 7 - .../mogo-module-service/consumer-rules.pro | 4 +- .../mogo-module-service/proguard-rules.pro | 2 - .../module/service/MogoServiceProvider.java | 3 - .../com/mogo/module/service/MogoServices.java | 9 - .../module/service/StatusChangedAdapter.java | 2 - .../service/handler/MainLooperHandler.java | 84 +----- .../intent/ADASStatusIntentHandler.java | 85 ------ .../intent/AccStatusIntentHandler.java | 3 +- .../service/intent/IntentHandlerFactory.java | 2 - .../service/intent/MockIntentHandler.java | 1 - .../service/location/MogoRTKLocation.java | 110 -------- .../service/marker/MapMarkerManager.java | 58 ---- .../service/network/RefreshApiService.java | 8 - .../network/bean/DemoUserInfoEntity.java | 267 ------------------ .../service/network/bean/TtsConfigEntity.java | 32 --- .../onlinecar/panel/ContainerHandler.java | 15 - .../onlinecar/panel/IOnlineCarPanelView.java | 27 -- .../onlinecar/panel/NavigationTargetInfo.java | 85 ------ .../panel/OnlineCarListPanelProvider.java | 71 ----- .../panel/OnlineCarPanelAdapter.java | 140 --------- .../panel/OnlineCarPanelFragment.java | 189 ------------- .../panel/OnlineCarPanelPresenter.java | 122 -------- .../onlinecar/panel/OnlineCarStrategy.java | 35 --- .../MogoRefreshStrategyController.java | 47 --- .../service/unwake/GlobalUnwakeConst.java | 55 ---- .../service/unwake/GlobalUnwakeManager.java | 118 -------- ...ule_services_fragment_online_car_panel.xml | 133 --------- .../module_services_online_car_panel_item.xml | 89 ------ .../layout/module_services_status_panel.xml | 23 -- .../com/mogo/service/IMogoServiceApis.java | 7 - .../mogo/service/impl/MogoServiceApis.java | 5 - .../service/impl/adas/MogoADASController.java | 2 +- .../impl/network/MogoNetWorkService.java | 6 +- 48 files changed, 36 insertions(+), 1927 deletions(-) delete mode 100644 core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/HttpDns.java create mode 100644 core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/MoGoRetrofitFactory.java delete mode 100644 core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/RetrofitFactory.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/ADASStatusIntentHandler.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/location/MogoRTKLocation.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/network/bean/DemoUserInfoEntity.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/network/bean/TtsConfigEntity.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/ContainerHandler.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/IOnlineCarPanelView.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/NavigationTargetInfo.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarListPanelProvider.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarPanelAdapter.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarPanelFragment.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarPanelPresenter.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarStrategy.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/strategy/MogoRefreshStrategyController.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/unwake/GlobalUnwakeConst.java delete mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/unwake/GlobalUnwakeManager.java delete mode 100644 modules/mogo-module-service/src/main/res/layout/module_services_fragment_online_car_panel.xml delete mode 100644 modules/mogo-module-service/src/main/res/layout/module_services_online_car_panel_item.xml delete mode 100644 modules/mogo-module-service/src/main/res/layout/module_services_status_panel.xml diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotBadCase.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotBadCase.kt index b25dc8388a..f9ce724573 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotBadCase.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotBadCase.kt @@ -27,7 +27,7 @@ import com.mogo.commons.debug.DebugConfig.getNetMode import com.mogo.eagle.core.data.autopilot.AutoPilotRecordResult import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.ui.tools.BadCaseEntity.Reason -import com.mogo.eagle.core.network.RetrofitFactory +import com.mogo.eagle.core.network.MoGoRetrofitFactory import com.mogo.eagle.core.network.utils.GsonUtil import com.mogo.eagle.core.utilcode.kotlin.* import com.mogo.eagle.core.utilcode.util.ThreadUtils @@ -127,11 +127,11 @@ class PostResult { private fun getHost(): String = if (getNetMode() == DebugConfig.NET_MODE_RELEASE) "http://dzt.zhidaozhixing.com" else "http://front.zdjs-private-test.myghost.zhidaoauto.com" internal suspend fun post(map: Map): Response { - return RetrofitFactory.getInstance(getHost()).create(BadCaseApi::class.java).post(map) + return MoGoRetrofitFactory.getInstance(getHost()).create(BadCaseApi::class.java).post(map) } private suspend fun get(): Response? { - return try { RetrofitFactory.getInstance(getHost()).create(BadCaseApi::class.java).get() } catch (t: Throwable) { t.printStackTrace(); null} + return try { MoGoRetrofitFactory.getInstance(getHost()).create(BadCaseApi::class.java).get() } catch (t: Throwable) { t.printStackTrace(); null} } private suspend fun updateCache(entity: BadCaseEntity) = suspendCancellableCoroutine { diff --git a/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java b/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java index fca45d8440..fcb63e443d 100644 --- a/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java +++ b/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java @@ -306,9 +306,8 @@ public abstract class MainMoGoApplication extends AbsMogoApplication { MogoModulePaths.addBaseModule(new MogoModule(UpgradeReportConstants.PATH, UpgradeReportConstants.NAME)); // 初始化 apm 日志采集 MogoModulePaths.addBaseModule(new MogoModule(CrashReportConstants.PATH, CrashReportConstants.NAME)); - if (DebugConfig.isMapBased()) { - MogoModulePaths.addModule(new MogoModule(CallChatConstant.PROVIDER, CallChatConstant.MODULE_NAME)); - } + // 车聊聊,IM + MogoModulePaths.addModule(new MogoModule(CallChatConstant.PROVIDER, CallChatConstant.MODULE_NAME)); MogoModulePaths.addBaseModule(new MogoModule(MapApiPath.PATH, "CustomMapApiBuilder")); MogoModulePaths.addBaseModule(new MogoModule(ServiceConst.PATH_REFRESH_STRATEGY, ServiceConst.PATH_REFRESH_STRATEGY)); @@ -331,8 +330,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication { MogoModulePaths.addModule(new MogoModule(PushUIConstants.PATH, "PUSH_UI")); // ADAS模块(旧,慢慢被 域控制器模块 替换掉) MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_ADAS, "AdasProvider")); - // 全局语音唤醒 - MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GLOBAL_UNWAKE, "GlobalUnwake")); // ADAS模块(旧,慢慢被 域控制器模块 替换掉) MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_ADAS, "AdasProvider")); diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt index 66ba33fcdb..606c7b1d02 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/bridge/BridgeApi.kt @@ -72,8 +72,6 @@ internal object BridgeApi { fun map() = apis?.mapServiceApi - fun onlineCarPanelApi(): IMogoOnlineCarListPanelProvider? = apis?.onlineCarPanelApi - fun statusManager(): IMogoStatusManager? = apis?.statusManagerApi fun topViewManager() = apis?.topViewManager diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java index 1d2f2ecba7..89e222a7d6 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/impl/V2XScenarioManager.java @@ -30,7 +30,6 @@ import com.mogo.map.uicontroller.VisualAngleMode; import com.mogo.module.common.entity.V2XMessageEntity; import com.mogo.module.v2x.scenario.scene.destination.V2XRecommendRouteScenario; import com.mogo.service.statusmanager.IMogoStatusManager; -import com.mogo.service.strategy.IMogoOnlineCarListPanelProvider; /** * author : donghongyu @@ -159,14 +158,6 @@ public class V2XScenarioManager implements IV2XScenarioManager { } private void hidOtherPanel() { - try { - // 与其它面板互斥 - IMogoOnlineCarListPanelProvider onlineCarListPanelProvider = BridgeApi.INSTANCE.onlineCarPanelApi(); - if (onlineCarListPanelProvider != null) { - onlineCarListPanelProvider.hidePanel(); - } - } catch (Exception e) { - e.printStackTrace(); - } + } } diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MogoServicePaths.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MogoServicePaths.java index 64a90b6be4..2c98a9b97e 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MogoServicePaths.java +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MogoServicePaths.java @@ -138,13 +138,6 @@ public class MogoServicePaths { @Deprecated public static final String PATH_ACTION_APIS = "/mogoaction/api"; - /** - * 刷新策略控制 - */ - @Keep - @Deprecated - public static final String PATH_REFRESH_STRATEGY_API = "/refreshstrategy/api"; - /** * 顶部1/2屏管理 */ diff --git a/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/HttpDns.java b/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/HttpDns.java deleted file mode 100644 index d846f59f95..0000000000 --- a/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/HttpDns.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.mogo.eagle.core.network; - -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.List; - -public -/** - * @author congtaowang - * @since 2020/11/18 - * - * 将HOST转换为HttpDNS的ip - */ -interface HttpDns { - - List< InetAddress > lookup( String hostname ) throws UnknownHostException; -} diff --git a/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/MoGoRetrofitFactory.java b/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/MoGoRetrofitFactory.java new file mode 100644 index 0000000000..349a38f1ea --- /dev/null +++ b/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/MoGoRetrofitFactory.java @@ -0,0 +1,19 @@ +package com.mogo.eagle.core.network; + +import com.mogo.cloud.network.RetrofitFactory; + +import retrofit2.Retrofit; + +public final class MoGoRetrofitFactory { + + private MoGoRetrofitFactory() { + } + + public static synchronized Retrofit getInstance(String baseUrl) { + return RetrofitFactory.INSTANCE.getInstance(baseUrl); + } + + public static synchronized Retrofit getInstanceNoCallAdapter(String baseUrl) { + return RetrofitFactory.INSTANCE.getInstanceNoCallAdapter(baseUrl); + } +} diff --git a/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/NetConfig.java b/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/NetConfig.java index c02bab11d0..7263d8a5d9 100644 --- a/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/NetConfig.java +++ b/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/NetConfig.java @@ -49,8 +49,6 @@ public final class NetConfig { private SSLContext sslContext; - private HttpDns httpDns; - private NetConfig() { } @@ -172,12 +170,4 @@ public final class NetConfig { this.sslContext = sslContext; } - public HttpDns getHttpDns() { - return httpDns; - } - - public NetConfig setHttpDns( HttpDns httpDns ) { - this.httpDns = httpDns; - return this; - } } diff --git a/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/RetrofitFactory.java b/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/RetrofitFactory.java deleted file mode 100644 index a59a449b09..0000000000 --- a/core/mogo-core-network/src/main/java/com/mogo/eagle/core/network/RetrofitFactory.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.mogo.eagle.core.network; - - -import retrofit2.Retrofit; - -public final class RetrofitFactory { - - private RetrofitFactory() { - } - - public static synchronized Retrofit getInstance(String baseUrl) { - return com.mogo.cloud.network.RetrofitFactory.INSTANCE.getInstance(baseUrl); - } - - public static synchronized Retrofit getInstanceNoCallAdapter(String baseUrl) { - return com.mogo.cloud.network.RetrofitFactory.INSTANCE.getInstanceNoCallAdapter(baseUrl); - } -} diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/network/NetConfigUtils.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/network/NetConfigUtils.java index a6f174a6cb..7138fa8fe1 100644 --- a/foudations/mogo-commons/src/main/java/com/mogo/commons/network/NetConfigUtils.java +++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/network/NetConfigUtils.java @@ -52,7 +52,6 @@ public class NetConfigUtils { Logger.d("DomainExchange", "oriHost: " + request.url().host() + " newHost: " + host + " \r\n newUrl: " + url); return chain.proceed(request.newBuilder().url(url).build()); }) - .setHttpDns(null) .setLoggable(DebugConfig.isDebug()); } diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java index 343a3e2958..4aa20c68ef 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java @@ -425,7 +425,6 @@ public class AMapViewWrapper implements IMogoMapView, return; } Logger.d(TAG, "锁车"); - // mMapView.getMapAutoViewHelper().setZoom(mLockZoom); mMapView.getMapAutoViewHelper().setLockMode(true); mIsCarLocked = true; } @@ -668,9 +667,7 @@ public class AMapViewWrapper implements IMogoMapView, @Override public void onLocationChanged(@NotNull com.zhidaoauto.map.sdk.open.location.MogoLocation location) { -// Log.w("DHY-location", location.getLon() + "," + location.getLat() + " AMapViewWrapper-onLocationChanged:location"); MogoLocation mLastLocation = ObjectUtils.fromLocation(location); -// Log.w("DHY-location", mLastLocation.getLongitude() + "," + mLastLocation.getLatitude() + " AMapViewWrapper-onLocationChanged:mLastLocation"); UiThreadHandler.post(() -> CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(mLastLocation)); Location sysLocation = new Location(location.getProvider()); @@ -732,8 +729,6 @@ public class AMapViewWrapper implements IMogoMapView, public void onMapLoaded() { Logger.i(TAG, "autoop--onMapLoaded: "); MapAutoApi.INSTANCE.getMyLocationStyle().myLocationIcon(HdMapBuildConfig.currentCarVrIconRes, true); //修改自车模型,未来需区分车的类型 - //mMapView.getMapAutoViewHelper().setRenderFrequency(true, 50);// 地图刷新频率 - //MogoMapListenerHandler.getInstance().onMapLoaded(); mMapLoaded = true; CameraPosition cameraPosition = mMapView.getMapAutoViewHelper().getCameraPosition(); Trace.beginSection("timer.onCameraChangeFinish"); diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/CustomMapApiBuilder.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/CustomMapApiBuilder.java index a1ed84e85b..fa2fb11402 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/CustomMapApiBuilder.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/CustomMapApiBuilder.java @@ -57,18 +57,18 @@ public class CustomMapApiBuilder implements IMogoMapApiBuilder { @Override public IMogoMapView getMapView(Context context) { Log.d(TAG, "setDebugMode==true"); - MapParams mapParams = MapParams.Companion.init(); mapParams.setDebugMode(false) - //.setDataFileSource(1) //todo 1-使用本地地图数据,0-使用在线地图数据 + //todo 1-使用本地地图数据,0-使用在线地图数据 + //.setDataFileSource(1) .setCoordinateType(MapParams.COORDINATETYPE_GCJ02) .setPerspectiveMode(MapParams.MAP_PERSPECTIVE_3D) // .setZoom( 20 ) // .setPointToCenter( 0.734375f, 0.5f ) - .setPointToCenter(0.5f, 0.5f) //todo 2D模式下需要注意ADAS部分遮挡 + //todo 2D模式下需要注意ADAS部分遮挡 + .setPointToCenter(0.5f, 0.5f) .setStyleMode(MapParams.MAP_STYLE_VR); - MapAutoApi.INSTANCE.init(context, mapParams); MapAutoView mapAutoView = new MapAutoView(context); //mapAutoView.registerRenderListener(l -> Log.i(TAG, "renderTime: " + l)); diff --git a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/CallChatCenter.kt b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/CallChatCenter.kt index c4a3f32a9d..f354c2e6b0 100644 --- a/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/CallChatCenter.kt +++ b/modules/mogo-module-carchatting/src/main/java/com/mogo/module/carchatting/biz/CallChatCenter.kt @@ -358,7 +358,6 @@ class CallChatCenter private constructor() : IBizCallChat.IBizCallBack, IVoiceCo @Synchronized private fun showLauncherCallingView() { Logger.d(TAG, "showLauncherCallingView : onlineCarPanelApi hidePanel") - serviceApi?.onlineCarPanelApi?.hidePanel() if (!showCallWindowFromDefault) { Logger.d(TAG, "showLauncherCallingView : 接听电话,隐藏用户信息窗口") hideUserWindow() diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java index ec0cbe63fc..8135db743e 100644 --- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java +++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java @@ -73,7 +73,6 @@ public class MainActivity extends MvpActivity implement protected View mEntrance; protected View mEventPanel; - protected View mHistoryMessagePanel; protected FrameLayout mFloatingLayout; protected View mCoverUpLayout; @@ -99,13 +98,11 @@ public class MainActivity extends MvpActivity implement mEventPanel = findViewById(R.id.module_main_id_event_panel_fragment_container); mFloatingLayout = findViewById(R.id.module_main_id_floating_view); mCoverUpLayout = findViewById(R.id.module_main_id_cover_up); - mHistoryMessagePanel = findViewById(R.id.module_main_id_message_history_fragment_container); clSpecialEffect = findViewById(R.id.cl_special_effect); FloatingViewHandler.init(mFloatingLayout); - mServiceApis.getOnlineCarPanelApi().initContainer(R.id.module_main_id_message_history_fragment_container, this); if (CallChatApi.getInstance().getApiProvider() != null) { CallChatApi.getInstance().getApiProvider().initVehicleTeamContainer("init", R.id.module_main_id_message_history_fragment_container, this); } @@ -419,8 +416,6 @@ public class MainActivity extends MvpActivity implement AdasConfigApiController.getInstance().release(); mServiceApis.getAdasControllerApi().release(); Logger.d(TAG, "destroy."); - mServiceApis.getRefreshStrategyControllerApi().clearAllData(); - mServiceApis.getOnlineCarPanelApi().clear(); ContextHolderUtil.releaseContext(); MogoModulesManager.getInstance().onDestroy(); SchemeIntent.getInstance().clear(); diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/SchemeIntent.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/SchemeIntent.java index de8b27f289..abf91a6339 100644 --- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/SchemeIntent.java +++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/SchemeIntent.java @@ -151,9 +151,6 @@ public class SchemeIntent implements IMogoStatusChangedListener { case TYPE_LAUNCH: handleLaunchIntent(target); break; - case TYPE_SHOW_ONLINE_CAR_PANEL: - handleShowOnlineCarPanel(target); - break; case TYPE_SHOW_HISTORY_PANEL: handleShowEventPanel(0); break; @@ -178,10 +175,6 @@ public class SchemeIntent implements IMogoStatusChangedListener { mApis.getAnalyticsApi().track("appenterfront", properties); } - private void handleShowOnlineCarPanel(Uri uri) { - mApis.getOnlineCarPanelApi().showPanel(); - } - /* * 语音打开事件面板 * */ diff --git a/modules/mogo-module-service/consumer-rules.pro b/modules/mogo-module-service/consumer-rules.pro index 8e6705bd1e..907ff0ef07 100644 --- a/modules/mogo-module-service/consumer-rules.pro +++ b/modules/mogo-module-service/consumer-rules.pro @@ -9,6 +9,4 @@ -keep interface com.mogo.module.service.intent.IntentHandler{*;} -keep interface com.mogo.module.service.network.RefreshApiService{*;} -keep interface com.mogo.module.service.network.RefreshCallback{*;} --keep interface com.mogo.module.service.network.bean.DemoUserInfoEntity{*;} --keep interface com.mogo.module.service.ttsConfig.TtsConfigApiService{*;} - -keep class com.mogo.module.service.ServiceConst{*;} \ No newline at end of file +-keep class com.mogo.module.service.ServiceConst{*;} \ No newline at end of file diff --git a/modules/mogo-module-service/proguard-rules.pro b/modules/mogo-module-service/proguard-rules.pro index 303ec6ae73..4df50abc36 100644 --- a/modules/mogo-module-service/proguard-rules.pro +++ b/modules/mogo-module-service/proguard-rules.pro @@ -23,9 +23,7 @@ #-----ServiceModule----- -keep class com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo.*{*;} -keep class com.mogo.module.service.network.RefreshBody.*{*;} --keep class com.mogo.module.service.network.bean.DemoUserInfoEntity.*{*;} -keep interface com.mogo.module.service.intent.IntentHandler -keep interface com.mogo.module.service.network.RefreshApiService -keep interface com.mogo.module.service.network.RefreshCallback --keep interface com.mogo.module.service.network.bean.DemoUserInfoEntity -keep class com.mogo.module.service.ServiceConst \ No newline at end of file diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServiceProvider.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServiceProvider.java index 24bd183b69..3625a1cc2c 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServiceProvider.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServiceProvider.java @@ -10,16 +10,13 @@ import androidx.fragment.app.Fragment; import com.alibaba.android.arouter.facade.annotation.Route; import com.mogo.commons.AbsMogoApplication; -import com.mogo.commons.debug.DebugConfig; import com.mogo.eagle.core.utilcode.mogo.logger.Logger; import com.mogo.eagle.core.utilcode.util.UiThreadHandler; import com.mogo.map.listener.IMogoMapListener; import com.mogo.map.location.IMogoLocationListener; import com.mogo.map.marker.IMogoMarkerClickListener; import com.mogo.map.navi.IMogoNaviListener; -import com.mogo.module.common.utils.CarSeries; import com.mogo.module.service.dispatch.DispatchAutoPilotManager; -import com.mogo.module.service.location.MogoRTKLocation; import com.mogo.module.service.routeoverlay.MogoRouteOverlayManager; import com.mogo.service.module.IMogoModuleLifecycle; import com.mogo.service.module.IMogoModuleProvider; diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java index 84895ecb2e..46e040b547 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java @@ -36,7 +36,6 @@ import com.mogo.module.common.MogoModule; import com.mogo.module.common.MogoModulePaths; import com.mogo.module.common.datacenter.SnapshotLocationDataCenter; import com.mogo.module.common.entity.MarkerResponse; -import com.mogo.module.service.autopilot.AutoPilotRemoteController; import com.mogo.module.service.handler.MainLooperHandler; import com.mogo.module.service.handler.RefreshWorkThreadHandler; import com.mogo.module.service.intent.IntentHandlerFactory; @@ -350,8 +349,6 @@ public class MogoServices implements IMogoMapListener, mFragmentManager.addMainFragmentStackTransactionListener( this ); - AutoPilotRemoteController.getInstance().start(); - Intent intent = new Intent( "com.freedom.ser.ACTION" ); intent.addFlags( Intent.FLAG_INCLUDE_STOPPED_PACKAGES ); mContext.sendBroadcast( intent ); @@ -671,11 +668,6 @@ public class MogoServices implements IMogoMapListener, * 刷新数据 */ private void notifyRefreshData( MogoLatLng latLng, int radius, RefreshCallback callback ) { - - if ( !DebugConfig.isMapBased() ) { - return; - } - if ( !mStatusManager.isMainPageLaunched() ) { return; } @@ -847,7 +839,6 @@ public class MogoServices implements IMogoMapListener, @Override public void onStopNavi() { - SpStorage.setNavigationTarget( "" ); Logger.d( TAG, "onStopNavi: remove MSG_SCHEDULE_CALCULATE_NOT_HOME_COMPANY_DISTANCE_FOR_PUSH msg" ); mHandler.removeMessages( ServiceConst.MSG_SCHEDULE_CALCULATE_NOT_HOME_COMPANY_DISTANCE_FOR_PUSH ); } diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/StatusChangedAdapter.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/StatusChangedAdapter.java index a0f81a21e3..eccbc2ca76 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/StatusChangedAdapter.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/StatusChangedAdapter.java @@ -107,8 +107,6 @@ abstract class StatusChangedAdapter implements IMogoStatusChangedListener { } }; } - //MogoApisHandler.getInstance().getApis().getShareManager().dismissShareDialog(); - MogoApisHandler.getInstance().getApis().getOnlineCarPanelApi().hidePanel(); MogoApisHandler.getInstance().getApis().getEventPanelManager().hidePanel(); if (mCarsChattingProvider == null) { mCarsChattingProvider = (ICarsChattingProvider) ARouter.getInstance().build(CallChattingProviderConstant.CAR_CALL_PROVIDER).navigation(); diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/handler/MainLooperHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/handler/MainLooperHandler.java index 804246a69b..c440c78c8b 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/handler/MainLooperHandler.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/handler/MainLooperHandler.java @@ -3,37 +3,16 @@ package com.mogo.module.service.handler; import android.os.Handler; import android.os.Looper; import android.os.Message; -import android.text.TextUtils; -import com.mogo.commons.AbsMogoApplication; -import com.mogo.commons.network.ParamsProvider; -import com.mogo.commons.storage.SpStorage; -import com.mogo.eagle.core.network.RequestOptions; -import com.mogo.eagle.core.network.SubscribeImpl; -import com.mogo.eagle.core.network.utils.GsonUtil; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.module.common.MogoApisHandler; -import com.mogo.module.common.constants.HostConst; -import com.mogo.module.service.MogoServices; import com.mogo.module.service.ServiceConst; -import com.mogo.module.service.network.RefreshApiService; -import com.mogo.module.service.network.bean.HomeCompanyDistanceForPushData; -import com.mogo.module.service.network.bean.HomeCompanyDistanceForPushResponse; -import com.mogo.module.service.onlinecar.panel.NavigationTargetInfo; -import java.util.Map; - -import io.reactivex.android.schedulers.AndroidSchedulers; -import io.reactivex.schedulers.Schedulers; - -public /** * @author congtaowang * @since 2020/12/14 * * 描述 */ -abstract class MainLooperHandler extends Handler { +public abstract class MainLooperHandler extends Handler { private static final String TAG = "MainLooperHandler"; @@ -52,9 +31,6 @@ abstract class MainLooperHandler extends Handler { case ServiceConst.MSG_LOOP_REQUEST: handleLoopRequestMessage( msg ); break; - case ServiceConst.MSG_SCHEDULE_CALCULATE_NOT_HOME_COMPANY_DISTANCE_FOR_PUSH: - handleScheduleCalculateNotHomeCompanyDistanceForPushMessage( msg ); - break; } } @@ -62,62 +38,4 @@ abstract class MainLooperHandler extends Handler { protected abstract void handleLoopRequestMessage( Message msg ); - protected void handleScheduleCalculateNotHomeCompanyDistanceForPushMessage( Message msg ) { - handleCalculationNotHomeCompanyDistanceForPush( msg.arg1 ); - } - - - /** - * 发起计算导航目的地推送策略 - * - * @param time 第x次重试 - */ - private void handleCalculationNotHomeCompanyDistanceForPush( final int time ) { - if ( time > 3 ) { - return; - } - String json = SpStorage.getNavigationTarget(); - if ( !TextUtils.isEmpty( json ) ) { - try { - NavigationTargetInfo info = GsonUtil.objectFromJson( json, NavigationTargetInfo.class ); - - Logger.d( TAG, "info = %s", info ); - - HomeCompanyDistanceForPushData data = new HomeCompanyDistanceForPushData(); - data.lat = Double.valueOf( info.getToPoiLatitude() ); - data.lon = Double.valueOf( info.getToPoiLongitude() ); - - final Map< String, Object > query = new ParamsProvider.Builder( AbsMogoApplication.getApp() ).build(); - query.put( "data", GsonUtil.jsonFromObject( data ) ); - MogoApisHandler.getInstance().getApis().getNetworkApi().create(RefreshApiService.class, HostConst.TRAVEL_CONDITION_HOST).calculationNotHomeCompanyDistanceForPush( query ) - .subscribeOn( Schedulers.io() ) - .observeOn( AndroidSchedulers.mainThread() ) - .subscribe( new SubscribeImpl< HomeCompanyDistanceForPushResponse >( RequestOptions.create( AbsMogoApplication.getApp() ) ) { - @Override - public void onSuccess( HomeCompanyDistanceForPushResponse o ) { - super.onSuccess( o ); - if ( o != null && o.result != null ) { - Logger.d( TAG, "calculationNotHomeCompanyDistanceForPush result %s", o.result.pushFlag ); - } - } - - @Override - public void onError( Throwable e ) { - super.onError( e ); - Logger.d( TAG, "re scheduleCalculationNotHomeCompanyDistanceForPush after 30s" ); - // 延时30s重试 - MogoServices.getInstance().scheduleCalculationNotHomeCompanyDistanceForPush( time + 1, 30_000L ); - } - - @Override - public void onError( String message, int code ) { - super.onError( message, code ); - } - } ); - } catch ( Exception e ) { - Logger.e( TAG, e, "handleCalculationNotHomeCompanyDistanceForPush" ); - } - - } - } } diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/ADASStatusIntentHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/ADASStatusIntentHandler.java deleted file mode 100644 index b4b5d98670..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/ADASStatusIntentHandler.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.mogo.module.service.intent; - -import android.content.Context; -import android.content.Intent; -import android.text.TextUtils; - -import com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo; -import com.mogo.eagle.core.network.utils.GsonUtil; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.module.common.datacenter.SnapshotLocationDataCenter; -import com.mogo.module.service.MarkerServiceHandler; -import com.mogo.module.service.ServiceConst; -import com.mogo.module.service.receiver.MogoReceiver; - -import org.json.JSONObject; - -/** - * @author congtaowang - * @since 2020/6/5 - *

- * 描述 - */ -public class ADASStatusIntentHandler implements IntentHandler { - - private static volatile ADASStatusIntentHandler sInstance; - - private ADASStatusIntentHandler() { - } - - public static ADASStatusIntentHandler getInstance() { - if (sInstance == null) { - synchronized (ADASStatusIntentHandler.class) { - if (sInstance == null) { - sInstance = new ADASStatusIntentHandler(); - } - } - } - return sInstance; - } - - public synchronized void release() { - sInstance = null; - } - - @Override - public void handle(Context context, Intent intent) { - if (intent == null) { - return; - } - - if (MogoReceiver.ACTIION_ADAS.equals(intent.getAction())) { - - int status = intent.getIntExtra(MogoReceiver.PARAM_ADAS_STATUS, 0); - MarkerServiceHandler.getMogoStatusManager().setADASUIShow(ServiceConst.TYPE, status == 1); - } - // 由于adas可能调高此处的调用频率,存在anr风险,且此处没有作用,所以暂时注释掉 - else { - String msg = intent.getStringExtra("adasMsg"); - if (TextUtils.isEmpty(msg)) { - return; - } - Logger.d("ADAS COOR", msg); - - AutopilotCarStateInfo stateInfo = GsonUtil.objectFromJson(msg, AutopilotCarStateInfo.class); - if (stateInfo != null && stateInfo.getValues() != null) { - JSONObject data = new JSONObject(); - try { - data.putOpt("lon", stateInfo.getValues().getLon()); - data.putOpt("lat", stateInfo.getValues().getLat()); - data.putOpt("alt", stateInfo.getValues().getAlt()); - data.putOpt("speed", stateInfo.getValues().getGnss_speed()); - data.putOpt("satelliteTime", stateInfo.getValues().getSatelliteTime()); - data.putOpt("heading", stateInfo.getValues().getHeading()); - data.putOpt("acceleration", stateInfo.getValues().getAcceleration()); - data.putOpt("yawRate", stateInfo.getValues().getYaw_rate()); - - MarkerServiceHandler.getApis().getMapServiceApi().getMapUIController().syncLocation2Map(data); - SnapshotLocationDataCenter.getInstance().syncAdasLocationInfo(data); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - } -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/AccStatusIntentHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/AccStatusIntentHandler.java index 2ad3ad119f..bb7ef3564d 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/AccStatusIntentHandler.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/AccStatusIntentHandler.java @@ -10,14 +10,13 @@ import com.mogo.module.service.ServiceConst; import com.mogo.module.service.launchercard.LauncherCardRefresher; import com.mogo.module.service.receiver.AccStatusReceiver; -public /** * @author congtaowang * @since 2020/6/5 * * 描述 */ -class AccStatusIntentHandler implements IntentHandler { +public class AccStatusIntentHandler implements IntentHandler { public static final byte ACC_ON = 1; public static final byte ACC_OFF = 0; diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandlerFactory.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandlerFactory.java index 70435f59e4..e585c734c4 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandlerFactory.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/IntentHandlerFactory.java @@ -27,8 +27,6 @@ public class IntentHandlerFactory { mHandlers.put( Intent.ACTION_POWER_CONNECTED, AccStatusIntentHandler.getInstance() ); mHandlers.put( Intent.ACTION_POWER_DISCONNECTED, AccStatusIntentHandler.getInstance() ); mHandlers.put( AccStatusReceiver.ACTION_NWD_ACC, AccStatusIntentHandler.getInstance() ); - mHandlers.put( MogoReceiver.ACTION_ADAS_STATUS, ADASStatusIntentHandler.getInstance() ); - mHandlers.put( MogoReceiver.ACTIION_ADAS, ADASStatusIntentHandler.getInstance() ); mHandlers.put( MogoReceiver.ACTION_VOICE_READY, new AIAssistIntentHandler() ); mHandlers.put( ServiceConst.COMMAND_BACK, WholeVoiceCommandIntentHandler.getInstance() ); mHandlers.put( MogoReceiver.ACTION_MOGO, new MogoControllerIntentHandler() ); diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/MockIntentHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/MockIntentHandler.java index 02a306d6f2..cd4119e57a 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/MockIntentHandler.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/MockIntentHandler.java @@ -248,7 +248,6 @@ public class MockIntentHandler implements IntentHandler { .owner(TAG) .autoManager(false); int duration = intent.getIntExtra("duration", 30); - MarkerServiceHandler.getApis().getRefreshStrategyControllerApi().restartAutoRefreshAtTime(duration); IMogoMarker marker = MarkerServiceHandler.getMarkerManager().addMarker(TAG, options); MarkerServiceHandler.getMogoStatusManager().setUserInteractionStatus(TAG, true, false); if (!MarkerServiceHandler.getApis().getStatusManagerApi().isVrMode()) { diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/location/MogoRTKLocation.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/location/MogoRTKLocation.java deleted file mode 100644 index e42efca46a..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/location/MogoRTKLocation.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.mogo.module.service.location; - -import android.annotation.SuppressLint; -import android.content.Context; -import android.location.Criteria; -import android.location.Location; -import android.location.LocationListener; -import android.location.LocationManager; -import android.os.Bundle; - -import com.mogo.commons.AbsMogoApplication; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.module.common.MogoApisHandler; -import com.mogo.module.common.datacenter.SnapshotLocationDataCenter; -import com.mogo.service.cloud.location.CloudLocationInfo; - -public class MogoRTKLocation { - - private static final String TAG = "MogoRTKLocation"; - private LocationManager locationManager; - - public static MogoRTKLocation getInstance() { - return RTKHolder.rtkLoc; - } - - private static class RTKHolder { - private static final MogoRTKLocation rtkLoc = new MogoRTKLocation(); - } - - private MogoRTKLocation() { - } - - @SuppressLint("MissingPermission") - public void init() { - locationManager = (LocationManager) AbsMogoApplication.getApp().getApplicationContext().getSystemService(Context.LOCATION_SERVICE); - String provider = locationManager.getBestProvider(getCriteria(), true); - Logger.d(TAG, "init provider : " + provider); - if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) { - try { - locationManager.requestLocationUpdates(provider, 0, 0, locationListener); - Location location = locationManager.getLastKnownLocation(provider); - if (location != null) { - Logger.i(TAG, "location : " + location.toString()); - } - } catch (Exception e) { - e.printStackTrace(); - Logger.d(TAG, "RTK LocationManager requestLocationUpdates has Exception : " + e.getMessage()); - } - } else { - Logger.d(TAG, "RTK LocationManager Provider GPS_PROVIDER unable"); - } - } - - private Criteria getCriteria() { - Criteria criteria = new Criteria(); - criteria.setAccuracy(Criteria.ACCURACY_FINE); //高精 - criteria.setAltitudeRequired(false); - criteria.setBearingRequired(true); - criteria.setSpeedRequired(true); - criteria.setPowerRequirement(Criteria.POWER_LOW); - return criteria; - } - - private final LocationListener locationListener = new LocationListener() { - @Override - public void onLocationChanged(Location location) { - if (location != null) { - CloudLocationInfo cloudLocationInfo = new CloudLocationInfo(); - if (location.getLatitude() != 0.0 && location.getLongitude() != 0.0) { - cloudLocationInfo.setAlt(location.getAltitude()); - cloudLocationInfo.setHeading(location.getBearing()); - cloudLocationInfo.setLat(location.getLatitude()); - cloudLocationInfo.setLon(location.getLongitude()); - cloudLocationInfo.setSpeed(location.getSpeed()); - cloudLocationInfo.setSatelliteTime(location.getTime()); - cloudLocationInfo.setSystemTime(System.currentTimeMillis()); - cloudLocationInfo.setTileId(String.valueOf(MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController() - .getTileId(location.getLongitude(), location.getLatitude()))); - SnapshotLocationDataCenter.getInstance().syncLocationInfo(cloudLocationInfo); - } - } else { - Logger.e(TAG, "location == null"); - } - } - - @Override - public void onStatusChanged(String provider, int status, Bundle extras) { - Logger.d(TAG, "onStatusChanged status: " + status); - } - - @Override - public void onProviderEnabled(String provider) { - Logger.d(TAG, "onProviderEnabled"); - } - - @Override - public void onProviderDisabled(String provider) { - Logger.d(TAG, "onProviderEnabled"); - } - }; - - public void stop() { - Logger.d(TAG, "stop RTK Location"); - if (locationManager != null && locationListener != null) { - locationManager.removeUpdates(locationListener); - } else { - Logger.d(TAG, "stop failed , listener: " + locationListener + " is null"); - } - } -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java index f8378da154..e453747ba7 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java @@ -152,64 +152,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener, } - // /** - // * 实时绘制连线 - // * - // * @param result - // */ - // private void drawLimberCollisionPolyline(ADASRecognizedResult result) { - // if (result != null) { - // IMogoPolyline polyLine = LimberCollisionPolyline.getInstance().getPolyLine(); - // MogoLatLng startLatLng = new MogoLatLng(result.lat, result.lon); - // MogoLatLng endLatlng = Trigonometric.getNewLocation(startLatLng, 20, result.heading); - // Log.d(TAG, "红色区域起始点 = " + startLatLng.lon + "," + startLatLng.lat - // + "终点" + endLatlng.lon + "," + endLatlng.lat + "--heading =" + result.heading); - // if (polyLine != null) { - // Log.d(TAG, "drawStopLine polyLine != null"); - // polyLine.setPoints(Arrays.asList(startLatLng, endLatlng)); - // } else { - // List latLngs = new ArrayList<>(); - // latLngs.add(startLatLng); - // latLngs.add(endLatlng); - // LimberCollisionPolyline.getInstance().draw((float) result.roadWidth, latLngs); - // } - // } else { - // LimberCollisionPolyline.getInstance().clearLine(); - // } - // } - - // private final static int MSG_SNAPSHOT = 1; - // private final static int MSG_ADAS = 2; - // - // /** - // * todo 后续从云端和adas侧拿到的数据 需求对数据流进行重新架构以扩展除添加marker外的其他预警类业务 - // * todo (应需要模块主动注册adas或云端数据回调,在具体模块内添加绘制需求,需要与地图侧确认是否支持并发) - // */ - // private final Handler mSnapshotHandler = new Handler(WorkThreadHandler.newInstance("snapshot-thread").getLooper()) { - // @Override - // public void handleMessage(Message msg) { - // super.handleMessage(msg); - // switch (msg.what) { - // case MSG_SNAPSHOT: - // if (msg.obj instanceof SocketDownData.LauncherSnapshotProto) { - // SnapshotSetDataDrawer.getInstance().renderSnapshotData(((SocketDownData.LauncherSnapshotProto) msg.obj)); - // } else { - // SnapshotSetDataDrawer.getInstance().renderSnapshotData(null); - // } - // break; - // case MSG_ADAS: - // // 绘制近景识别到的车辆 - // if (msg.obj instanceof List) { - // List recognizedResults = (List) msg.obj; - // AdasRecognizedResultDrawer.getInstance().renderAdasRecognizedResult(recognizedResults); - // } - // break; - // default: - // break; - // } - // } - // }; - /** * 地图上的Marker点击回调 */ diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshApiService.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshApiService.java index eca03ba6ec..11566fb785 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshApiService.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/RefreshApiService.java @@ -2,7 +2,6 @@ package com.mogo.module.service.network; import com.mogo.eagle.core.data.BaseData; import com.mogo.module.common.entity.MarkerResponse; -import com.mogo.module.service.network.bean.DemoUserInfoEntity; import com.mogo.module.service.network.bean.HomeCompanyDistanceForPushResponse; import com.mogo.module.service.network.bean.TtsConfigData; @@ -11,7 +10,6 @@ import java.util.Map; import io.reactivex.Observable; import retrofit2.http.FieldMap; import retrofit2.http.FormUrlEncoded; -import retrofit2.http.GET; import retrofit2.http.POST; /** @@ -40,12 +38,6 @@ public interface RefreshApiService { @POST( "/yycp-launcherSnapshot/user/queryOnLineCarWithRoute" ) Observable< MarkerResponse > queryOnLineCarWithRoute( @FieldMap Map< String, Object > parameters ); - /** - * 查询演示车用户信息 - */ - @GET( "/yycp-launcherSnapshot/mock/getMockUserInfos" ) - Observable< DemoUserInfoEntity > getMockUsers(); - @FormUrlEncoded @POST( "/yycp-travel-condition/trajectoryPrediction/calculationNotHomeCompanyDistanceForPush" ) Observable< HomeCompanyDistanceForPushResponse > calculationNotHomeCompanyDistanceForPush( @FieldMap Map< String, Object > parameters ); diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/bean/DemoUserInfoEntity.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/bean/DemoUserInfoEntity.java deleted file mode 100644 index d9074c4849..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/bean/DemoUserInfoEntity.java +++ /dev/null @@ -1,267 +0,0 @@ -package com.mogo.module.service.network.bean; - -import com.mogo.eagle.core.data.BaseData; - -import java.util.List; - -/** - * author : donghongyu - * e-mail : 1358506549@qq.com - * date : 2020/4/24 4:20 PM - * desc : TODO 前瞻需求演示使用的用户数据 - * version: 1.0 - */ -public class DemoUserInfoEntity extends BaseData { - - /** - * code : 0 - * msg : - * detailMsg : - * result : {"userList":[{"sceneType":"1","location":{"lat":39.97541,"lon":116.41782761},"userInfo":{"sn":"ZD801B1920L00818","userId":1,"userName":"用户昵称","userHead":"https://www.baidu.com/img/baidu_jgylogo3.png","gender":"男","age":20,"lastActiveweekAvgscore":"96","safeLabel":"老司机","safeLabelType":1}},{"sceneType":"2","location":{"lat":39.97541,"lon":116.41782761},"userInfo":{"sn":"ZD802B1932L00779","userId":1,"userName":"用户昵称","userHead":"https://www.baidu.com/img/baidu_jgylogo3.png","gender":"男","age":20,"lastActiveweekAvgscore":"96","safeLabel":"老司机","safeLabelType":1}},{"sceneType":"3","location":{"lat":39.97541,"lon":116.41782761},"userInfo":{"sn":"ZD802B1932L00779","userId":1,"userName":"用户昵称","userHead":"https://www.baidu.com/img/baidu_jgylogo3.png","gender":"男","age":20,"lastActiveweekAvgscore":"96","safeLabel":"老司机","safeLabelType":1}}]} - */ - - private String detailMsg; - private ResultBean result; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } - - public String getDetailMsg() { - return detailMsg; - } - - public void setDetailMsg(String detailMsg) { - this.detailMsg = detailMsg; - } - - public ResultBean getResult() { - return result; - } - - public void setResult(ResultBean result) { - this.result = result; - } - - public static class ResultBean { - private List userList; - - public List getUserList() { - return userList; - } - - public void setUserList(List userList) { - this.userList = userList; - } - - public static class UserListBean { - /** - * sceneType : 1 - * location : {"lat":39.97541,"lon":116.41782761} - * userInfo : {"sn":"ZD801B1920L00818","userId":1,"userName":"用户昵称","userHead":"https://www.baidu.com/img/baidu_jgylogo3.png","gender":"男","age":20,"lastActiveweekAvgscore":"96","safeLabel":"老司机","safeLabelType":1} - */ - - private String sceneType; - private LocationBean location; - private UserInfoBean userInfo; - - public String getSceneType() { - return sceneType; - } - - public void setSceneType(String sceneType) { - this.sceneType = sceneType; - } - - public LocationBean getLocation() { - return location; - } - - public void setLocation(LocationBean location) { - this.location = location; - } - - public UserInfoBean getUserInfo() { - return userInfo; - } - - public void setUserInfo(UserInfoBean userInfo) { - this.userInfo = userInfo; - } - - public static class LocationBean { - /** - * lat : 39.97541 - * lon : 116.41782761 - */ - - private double lat; - private double lon; - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - @Override - public String toString() { - return "LocationBean{" + - "lat=" + lat + - ", lon=" + lon + - '}'; - } - } - - public static class UserInfoBean { - /** - * sn : ZD801B1920L00818 - * userId : 1 - * userName : 用户昵称 - * userHead : https://www.baidu.com/img/baidu_jgylogo3.png - * gender : 男 - * age : 20 - * lastActiveweekAvgscore : 96 - * safeLabel : 老司机 - * safeLabelType : 1 - */ - - private String sn; - private int userId; - private String userName; - private String userHead; - private String gender; - private int age; - private String lastActiveweekAvgscore; - private String safeLabel; - private int safeLabelType; - - public String getSn() { - return sn; - } - - public void setSn(String sn) { - this.sn = sn; - } - - public int getUserId() { - return userId; - } - - public void setUserId(int userId) { - this.userId = userId; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getUserHead() { - return userHead; - } - - public void setUserHead(String userHead) { - this.userHead = userHead; - } - - public String getGender() { - return gender; - } - - public void setGender(String gender) { - this.gender = gender; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getLastActiveweekAvgscore() { - return lastActiveweekAvgscore; - } - - public void setLastActiveweekAvgscore(String lastActiveweekAvgscore) { - this.lastActiveweekAvgscore = lastActiveweekAvgscore; - } - - public String getSafeLabel() { - return safeLabel; - } - - public void setSafeLabel(String safeLabel) { - this.safeLabel = safeLabel; - } - - public int getSafeLabelType() { - return safeLabelType; - } - - public void setSafeLabelType(int safeLabelType) { - this.safeLabelType = safeLabelType; - } - - @Override - public String toString() { - return "UserInfoBean{" + - "sn='" + sn + '\'' + - ", userId=" + userId + - ", userName='" + userName + '\'' + - ", userHead='" + userHead + '\'' + - ", gender='" + gender + '\'' + - ", age=" + age + - ", lastActiveweekAvgscore='" + lastActiveweekAvgscore + '\'' + - ", safeLabel='" + safeLabel + '\'' + - ", safeLabelType=" + safeLabelType + - '}'; - } - } - - @Override - public String toString() { - return "UserListBean{" + - "sceneType='" + sceneType + '\'' + - ", location=" + location + - ", userInfo=" + userInfo + - '}'; - } - } - } - - @Override - public String toString() { - return "V2XDemoUserInfoEntity{" + - "detailMsg='" + detailMsg + '\'' + - ", result=" + result + - '}'; - } -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/bean/TtsConfigEntity.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/bean/TtsConfigEntity.java deleted file mode 100644 index 48db2d8b84..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/network/bean/TtsConfigEntity.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.mogo.module.service.network.bean; - -import com.mogo.eagle.core.data.BaseData; - -/** - * @author :zhuangyan - * @date : 2020/11/17 11:43 - * @desc :分体机tts播报信息返回 - */ -public class TtsConfigEntity extends BaseData { - public Result result; - - public Result getResult() { - return result; - } - - public void setResult(Result result) { - this.result = result; - } - - public static class Result { - private String word; - - public String getWord() { - return word; - } - - public void setWord(String word) { - this.word = word; - } - } -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/ContainerHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/ContainerHandler.java deleted file mode 100644 index b09def3289..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/ContainerHandler.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.mogo.module.service.onlinecar.panel; - -import androidx.fragment.app.FragmentActivity; - -/** - * @author congtaowang - * @since 2020/9/21 - *

- * 描述 - */ -class ContainerHandler { - - public static int sContainerId = 0; - public static FragmentActivity sAttachContext; -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/IOnlineCarPanelView.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/IOnlineCarPanelView.java deleted file mode 100644 index 9f361462b4..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/IOnlineCarPanelView.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.mogo.module.service.onlinecar.panel; - -import com.mogo.commons.mvp.IView; -import com.mogo.module.common.entity.MarkerOnlineCar; - -import java.util.List; - -/** - * @author congtaowang - * @since 2020/9/21 - *

- * 描述 - */ -interface IOnlineCarPanelView extends IView { - - void showLoading(boolean visible); - - void renderOnlineCarList( List< MarkerOnlineCar > onlineCars, double lon, double lat ); - - void renderEmptyUi( OnlineCarStrategy strategy ); - - void renderNoNavigationInfoUi(); - - void renderErrorUi(); - - void removeSelf(); -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/NavigationTargetInfo.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/NavigationTargetInfo.java deleted file mode 100644 index a8c5635cd9..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/NavigationTargetInfo.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.mogo.module.service.onlinecar.panel; - -public -/** - * @author congtaowang - * @since 2020/9/21 - *

- * 描述 - */ -class NavigationTargetInfo { - - - /** - * FromPoiName : 东城区小黄庄北街2号 - * FromPoiAddr : 在中国银行(北京安贞桥支行)附近 - * FromPoiLongitude : 116.41082763671875 - * FromPoiLatitude : 39.96831130981445 - * ToPoiName : 北京市北京市北小营镇宏大工业开发中心A座7号 - * ToPoiLongitude : 116.74490356445312 - * ToPoiLatitude : 40.19820785522461 - */ - private String FromPoiName; - private String FromPoiAddr; - private String FromPoiLongitude; - private String FromPoiLatitude; - private String ToPoiName; - private String ToPoiLongitude; - private String ToPoiLatitude; - - public String getFromPoiName() { - return FromPoiName; - } - - public void setFromPoiName( String FromPoiName ) { - this.FromPoiName = FromPoiName; - } - - public String getFromPoiAddr() { - return FromPoiAddr; - } - - public void setFromPoiAddr( String FromPoiAddr ) { - this.FromPoiAddr = FromPoiAddr; - } - - public String getFromPoiLongitude() { - return FromPoiLongitude; - } - - public void setFromPoiLongitude( String FromPoiLongitude ) { - this.FromPoiLongitude = FromPoiLongitude; - } - - public String getFromPoiLatitude() { - return FromPoiLatitude; - } - - public void setFromPoiLatitude( String FromPoiLatitude ) { - this.FromPoiLatitude = FromPoiLatitude; - } - - public String getToPoiName() { - return ToPoiName; - } - - public void setToPoiName( String ToPoiName ) { - this.ToPoiName = ToPoiName; - } - - public String getToPoiLongitude() { - return ToPoiLongitude; - } - - public void setToPoiLongitude( String ToPoiLongitude ) { - this.ToPoiLongitude = ToPoiLongitude; - } - - public String getToPoiLatitude() { - return ToPoiLatitude; - } - - public void setToPoiLatitude( String ToPoiLatitude ) { - this.ToPoiLatitude = ToPoiLatitude; - } -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarListPanelProvider.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarListPanelProvider.java deleted file mode 100644 index bc311cfa2e..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarListPanelProvider.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.mogo.module.service.onlinecar.panel; - -import android.content.Context; - -import androidx.fragment.app.Fragment; -import androidx.fragment.app.FragmentActivity; - -import com.alibaba.android.arouter.facade.annotation.Route; -import com.mogo.eagle.core.data.constants.MogoServicePaths; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.service.strategy.IMogoOnlineCarListPanelProvider; - -public -/** - * @author congtaowang - * @since 2020/9/21 - * - * 描述 - */ -@Route( path = MogoServicePaths.PATH_ONLINE_CAR_PANEL ) -class OnlineCarListPanelProvider implements IMogoOnlineCarListPanelProvider { - - private static final String TAG = "OnlineCarListPanelProvider"; - - @Override - public void initContainer( int containerId, FragmentActivity activity ) { - ContainerHandler.sContainerId = containerId; - ContainerHandler.sAttachContext = activity; - } - - @Override - public void showPanel() { - if ( ContainerHandler.sAttachContext == null ) { - return; - } - Fragment fragment = new OnlineCarPanelFragment(); - Logger.d( TAG, "showPanel" ); - ContainerHandler.sAttachContext - .getSupportFragmentManager() - .beginTransaction() - .replace( ContainerHandler.sContainerId, fragment, TAG ) - .commitNowAllowingStateLoss(); - } - - @Override - public void hidePanel() { - if ( ContainerHandler.sAttachContext == null ) { - return; - } - Logger.d( TAG, "hidePanel" ); - Fragment fragment = ContainerHandler.sAttachContext.getSupportFragmentManager().findFragmentByTag( TAG ); - if ( fragment != null ) { - ContainerHandler.sAttachContext - .getSupportFragmentManager() - .beginTransaction() - .remove( fragment ) - .commitNowAllowingStateLoss(); - } - } - - @Override - public void clear() { - ContainerHandler.sContainerId = 0; - ContainerHandler.sAttachContext = null; - } - - @Override - public void init( Context context ) { - - } -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarPanelAdapter.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarPanelAdapter.java deleted file mode 100644 index b5e1919cdb..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarPanelAdapter.java +++ /dev/null @@ -1,140 +0,0 @@ -package com.mogo.module.service.onlinecar.panel; - -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageView; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; - -import com.bumptech.glide.request.RequestOptions; -import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.module.common.MogoApisHandler; -import com.mogo.module.common.api.CallChatApi; -import com.mogo.module.common.entity.MarkerLocation; -import com.mogo.module.common.entity.MarkerOnlineCar; -import com.mogo.module.common.entity.MarkerUserInfo; -import com.mogo.module.common.glide.SkinAbleBitmapTarget; -import com.mogo.module.service.MarkerServiceHandler; -import com.mogo.module.service.R; -import com.mogo.module.service.Utils; -import com.mogo.eagle.core.utilcode.mogo.toast.ResourcesHelper; -import com.zhidao.carchattingprovider.CallChattingProviderConstant; -import com.zhidao.carchattingprovider.ICarsChattingProvider; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author congtaowang - * @since 2020/9/21 - *

- * 描述 - */ -class OnlineCarPanelAdapter extends RecyclerView.Adapter { - - private static final String TAG = "OnlineCarPanelAdapter"; - - private List mDatums; - private double mToLon; - private double mToLat; - - public OnlineCarPanelAdapter(List mDatums, double mToLon, double mToLat) { - this.mDatums = mDatums; - this.mToLon = mToLon; - this.mToLat = mToLat; - } - - public void setDatums(List mDatums) { - this.mDatums = mDatums; - notifyDataSetChanged(); - } - - @NonNull - @Override - public OnlineCarPanelAdapter.VH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - return new VH(LayoutInflater.from(parent.getContext()).inflate(R.layout.module_services_online_car_panel_item, null)); - } - - @Override - public void onBindViewHolder(@NonNull OnlineCarPanelAdapter.VH holder, int position) { - holder.bind(mDatums.get(position), mToLon, mToLat); - holder.call.setOnClickListener(view -> { - Map params = new HashMap<>(); - MarkerUserInfo userInfo = mDatums.get(position).getUserInfo(); - params.put(CallChattingProviderConstant.CCPROVIDER_SN, userInfo.getSn()); - params.put(CallChattingProviderConstant.CCPROVIDER_USER_IMG, userInfo.getUserHead()); - params.put(CallChattingProviderConstant.CCPROVIDER_USER_AGE, userInfo.getAgeNumber() + ""); - params.put(CallChattingProviderConstant.CCPROVIDER_NICK_NAME, userInfo.getUserName()); - params.put(CallChattingProviderConstant.CCPROVIDER_USER_SEX, userInfo.getGender() + ""); - MarkerLocation location = mDatums.get(position).getLocation(); - params.put(CallChattingProviderConstant.CCPROVIDER_ADDRESS, location.getAddress()); - params.put(CallChattingProviderConstant.CCPROVIDER_LAT, location.getLat() + ""); - params.put(CallChattingProviderConstant.CCPROVIDER_LON, location.getLon() + ""); - ICarsChattingProvider carChatting = MarkerServiceHandler.getCarChatting(); - if ( carChatting != null ) { - carChatting.call(params); - } - }); - } - - @Override - public int getItemCount() { - return mDatums == null ? 0 : mDatums.size(); - } - - public static class VH extends RecyclerView.ViewHolder { - - private ImageView avatar; - private TextView nickname; - private TextView distance; - private TextView detail; - private TextView call; - - public VH(@NonNull View itemView) { - super(itemView); - RecyclerView.LayoutParams params = new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); - params.bottomMargin = ResourcesHelper.getDimensionPixelSize(itemView.getContext(), R.dimen.module_services_panel_item_marginBottom); - itemView.setLayoutParams(params); - avatar = itemView.findViewById(R.id.module_services_id_panel_item_avatar); - nickname = itemView.findViewById(R.id.module_services_id_panel_item_nickname); - distance = itemView.findViewById(R.id.module_services_id_panel_item_distance); - detail = itemView.findViewById(R.id.module_services_id_panel_item_detail); - call = itemView.findViewById(R.id.module_services_id_panel_item_call); - } - - public void bind(MarkerOnlineCar car, double lon, double lat) { - RequestOptions options = new RequestOptions().circleCrop().placeholder(R.drawable.module_common_default_user_head).error(R.drawable.module_common_default_user_head); - GlideApp.with(itemView.getContext()).asBitmap().apply(options).load(car.getUserInfo().getUserHead()).into(new SkinAbleBitmapTarget(avatar, options)); - nickname.setText(car.getUserInfo().getUserName()); - String content = getDistanceStr(car.getLocation(), lon, lat); - distance.setText(content); - detail.setOnClickListener(view -> { - MogoApisHandler.getInstance().getApis().getAnalyticsApi().track("Mogoer_List_click", null); - try { - CallChatApi.getInstance().showUserWindow(itemView.getContext(), car); - } catch (Exception e) { - Logger.e(TAG, e, "detail.OnClick"); - } - }); - } - - private String getDistanceStr(MarkerLocation location, double lon, double lat) { - if (location == null) { - return "未知"; - } - float distance = Utils.calculateLineDistance(location.getLon(), location.getLat(), lon, lat); - if (distance >= 1000) { - return String.format("%.1f公里", distance / 1000); - } else { - return String.format("%.1f米", distance); - } - } - } - - -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarPanelFragment.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarPanelFragment.java deleted file mode 100644 index 6a81343fff..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarPanelFragment.java +++ /dev/null @@ -1,189 +0,0 @@ -package com.mogo.module.service.onlinecar.panel; - -import android.view.View; -import android.widget.ProgressBar; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; - -import com.mogo.commons.mvp.MvpFragment; -import com.mogo.commons.voice.AIAssist; -import com.mogo.module.common.MogoApisHandler; -import com.mogo.module.common.entity.MarkerOnlineCar; -import com.mogo.module.common.view.OnPreventFastClickListener; -import com.mogo.module.service.MarkerServiceHandler; -import com.mogo.module.service.R; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author congtaowang - * @since 2020/9/21 - *

- * 描述 - */ -public class OnlineCarPanelFragment extends MvpFragment< IOnlineCarPanelView, OnlineCarPanelPresenter > implements IOnlineCarPanelView { - private String TAG = "OnlineCarPanelFragment"; - - private RecyclerView mList; - private View mErrorPanel; - - private View mRefreshPanel; - private TextView mEmptyTip; - private View m20KMStrategy; - private View m40KMStrategy; - - private ProgressBar mLoading; - - private OnlineCarPanelAdapter mOnlineCarPanelAdapter; - - @Override - protected int getLayoutId() { - return R.layout.module_services_fragment_online_car_panel; - } - - @Override - public String getTagName() { - return TAG; - } - - @Override - protected void initViews() { - findViewById( R.id.module_services_id_close ).setOnClickListener( new OnPreventFastClickListener() { - @Override - public void onClickImpl( View v ) { - removeSelf(); - } - } ); - mList = findViewById( R.id.module_services_id_recycler_view ); - mRefreshPanel = findViewById( R.id.module_services_id_load_strategy_container ); - mErrorPanel = findViewById( R.id.module_services_id_error_container ); - m20KMStrategy = findViewById( R.id.module_services_id_20Km_radius ); - m40KMStrategy = findViewById( R.id.module_services_id_40Km_radius ); - mEmptyTip = findViewById( R.id.module_services_empty_tip ); - mLoading = findViewById( R.id.module_services_id_loading ); - - mList.setLayoutManager( new LinearLayoutManager( getContext(), LinearLayoutManager.VERTICAL, false ) ); - - m20KMStrategy.setOnClickListener( new OnPreventFastClickListener() { - @Override - public void onClickImpl( View v ) { - mPresenter.next20KMStrategy(); - } - } ); - m40KMStrategy.setOnClickListener( new OnPreventFastClickListener() { - @Override - public void onClickImpl( View v ) { - mPresenter.next40KMStrategy(); - } - } ); - mErrorPanel.setOnClickListener( new OnPreventFastClickListener() { - @Override - public void onClickImpl( View v ) { - mPresenter.loadOnlineCar(); - } - } ); - - mRootView.setOnClickListener( view -> { - } ); - } - - public void refreshPanel() { - mPresenter.refreshPanel(); - } - - @Override - public void showLoading( boolean visible ) { - if ( visible ) { - mRefreshPanel.setVisibility( View.GONE ); - mList.setVisibility( View.GONE ); - mErrorPanel.setVisibility( View.GONE ); - mLoading.setVisibility( View.VISIBLE ); - } else { - mLoading.setVisibility( View.GONE ); - } - } - - @NonNull - @Override - protected OnlineCarPanelPresenter createPresenter() { - return new OnlineCarPanelPresenter( this ); - } - - @Override - public void renderOnlineCarList( List< MarkerOnlineCar > onlineCars, double lon, double lat ) { - mRefreshPanel.setVisibility( View.GONE ); - mErrorPanel.setVisibility( View.GONE ); - mList.setVisibility( View.VISIBLE ); - mLoading.setVisibility( View.GONE ); - if ( mOnlineCarPanelAdapter == null ) { - mOnlineCarPanelAdapter = new OnlineCarPanelAdapter( onlineCars, lon, lat ); - mList.setAdapter( mOnlineCarPanelAdapter ); - } else { - mOnlineCarPanelAdapter.setDatums( onlineCars ); - } - AIAssist.getInstance( getContext() ).speakTTSVoice( String.format( "为您找到%s个车友", onlineCars.size() ) ); - Map< String, Object > properties = new HashMap<>(); - properties.put( "number", onlineCars.size() ); - MogoApisHandler.getInstance().getApis().getAnalyticsApi().track( "Mogoer_List_number", properties ); - } - - @Override - public void renderEmptyUi( OnlineCarStrategy strategy ) { - mErrorPanel.setVisibility( View.GONE ); - mList.setVisibility( View.GONE ); - mRefreshPanel.setVisibility( View.VISIBLE ); - mLoading.setVisibility( View.GONE ); - - AIAssist.getInstance( getContext() ).speakTTSVoice( "未找到车友" ); - if ( strategy == null ) { - m20KMStrategy.setVisibility( View.GONE ); - m40KMStrategy.setVisibility( View.GONE ); - mEmptyTip.setText( getString( R.string.module_services_online_car_panel_empty_tmpl, OnlineCarStrategy.Strategy3.getRadiusKM() ) ); - } else { - switch ( strategy ) { - case Strategy3: - m20KMStrategy.setVisibility( View.GONE ); - m40KMStrategy.setVisibility( View.GONE ); - case Strategy2: - m20KMStrategy.setVisibility( View.GONE ); - case Default: - break; - } - mEmptyTip.setText( getString( R.string.module_services_online_car_panel_empty_tmpl, strategy.getRadiusKM() ) ); - } - } - - @Override - public void renderNoNavigationInfoUi() { - mList.setVisibility( View.GONE ); - mRefreshPanel.setVisibility( View.GONE ); - mErrorPanel.setVisibility( View.VISIBLE ); - mLoading.setVisibility( View.GONE ); - } - - @Override - public void renderErrorUi() { - mList.setVisibility( View.GONE ); - mRefreshPanel.setVisibility( View.GONE ); - mLoading.setVisibility( View.GONE ); - mErrorPanel.setVisibility( View.VISIBLE ); - } - - @Override - public void removeSelf() { - MogoApisHandler.getInstance().getApis().getOnlineCarPanelApi().hidePanel(); - } - - @Override - public void onDestroyView() { - if ( mPresenter != null ) { - mPresenter.destroy(); - } - super.onDestroyView(); - } -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarPanelPresenter.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarPanelPresenter.java deleted file mode 100644 index d2b1946f14..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarPanelPresenter.java +++ /dev/null @@ -1,122 +0,0 @@ -package com.mogo.module.service.onlinecar.panel; - -import android.text.TextUtils; - -import androidx.annotation.NonNull; -import androidx.lifecycle.LifecycleOwner; - -import com.mogo.commons.mvp.Presenter; -import com.mogo.commons.storage.SpStorage; -import com.mogo.eagle.core.network.utils.GsonUtil; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.map.IDestroyable; -import com.mogo.eagle.core.data.map.MogoLatLng; -import com.mogo.map.navi.IMogoNaviListener2; -import com.mogo.module.common.MogoApisHandler; -import com.mogo.module.common.entity.MarkerResponse; -import com.mogo.module.service.network.RefreshCallback; -import com.mogo.module.service.network.RefreshModel; - -/** - * @author congtaowang - * @since 2020/9/21 - *

- * 描述 - */ -class OnlineCarPanelPresenter extends Presenter< IOnlineCarPanelView > implements - RefreshCallback< MarkerResponse >, - IMogoNaviListener2, - IDestroyable { - - private static final String TAG = "OnlineCarPanelPresenter"; - - public static final int LIMIT = 20; - private RefreshModel mRefreshModel; - private OnlineCarStrategy mStrategy; - private NavigationTargetInfo mNavigationTargetInfo; - private Double mToLat; - private Double mToLon; - - public OnlineCarPanelPresenter( IOnlineCarPanelView view ) { - super( view ); - mRefreshModel = new RefreshModel( getContext() ); - MogoApisHandler.getInstance().getApis().getRegisterCenterApi().registerMogoNaviListener( TAG, this ); - } - - @Override - public void onStopNavi() { - mView.removeSelf(); - } - - @Override - public void onCreate( @NonNull LifecycleOwner owner ) { - super.onCreate( owner ); - refreshPanel(); - } - - public void next20KMStrategy() { - mStrategy = OnlineCarStrategy.Strategy2; - loadOnlineCar(); - } - - public void next40KMStrategy() { - mStrategy = OnlineCarStrategy.Strategy3; - loadOnlineCar(); - } - - public void refreshPanel() { - mStrategy = OnlineCarStrategy.Default; - String json = SpStorage.getNavigationTarget(); - if ( TextUtils.isEmpty( json ) ) { - mView.renderNoNavigationInfoUi(); - return; - } - Logger.d( TAG, json ); - mNavigationTargetInfo = GsonUtil.objectFromJson( json, NavigationTargetInfo.class ); - loadOnlineCar(); - } - - public void loadOnlineCar() { - if ( mNavigationTargetInfo == null ) { - mView.renderNoNavigationInfoUi(); - return; - } - mView.showLoading( true ); - try { - mToLat = Double.valueOf( mNavigationTargetInfo.getToPoiLatitude() ); - mToLon = Double.valueOf( mNavigationTargetInfo.getToPoiLongitude() ); - mRefreshModel.queryOnLineCarWithRoute( new MogoLatLng( mToLat, mToLon ), - false, - false, - mStrategy.getRadius(), - LIMIT, - true, - this - ); - } catch ( Exception e ) { - mView.renderNoNavigationInfoUi(); - } - } - - @Override - public void onSuccess( MarkerResponse o ) { - if ( o == null - || o.getResult() == null - || o.getResult().getOnlineCar() == null - || o.getResult().getOnlineCar().isEmpty() ) { - mView.renderEmptyUi( mStrategy ); - } else { - mView.renderOnlineCarList( o.getResult().getOnlineCar(), mToLon, mToLat ); - } - } - - @Override - public void onFail() { - mView.renderErrorUi(); - } - - @Override - public void destroy() { - MogoApisHandler.getInstance().getApis().getRegisterCenterApi().unregisterMogoNaviListener( TAG ); - } -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarStrategy.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarStrategy.java deleted file mode 100644 index ffad8fc82a..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/onlinecar/panel/OnlineCarStrategy.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.mogo.module.service.onlinecar.panel; - -/** - * @author congtaowang - * @since 2020/9/21 - *

- * 描述 - */ -enum OnlineCarStrategy { - - Strategy3( 40_000, null ), - Strategy2( 20_000, Strategy3 ), - Default( 10_000, Strategy2 ), - ; - - private int radius; - private OnlineCarStrategy next; - - OnlineCarStrategy( int radius, OnlineCarStrategy next ) { - this.radius = radius; - this.next = next; - } - - public int getRadius() { - return radius; - } - - public int getRadiusKM() { - return radius / 1000; - } - - public OnlineCarStrategy getNext() { - return next; - } -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/strategy/MogoRefreshStrategyController.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/strategy/MogoRefreshStrategyController.java deleted file mode 100644 index a88c4f877a..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/strategy/MogoRefreshStrategyController.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.mogo.module.service.strategy; - -import android.content.Context; - -import com.alibaba.android.arouter.facade.annotation.Route; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.module.service.MogoServices; -import com.mogo.eagle.core.data.constants.MogoServicePaths; -import com.mogo.service.strategy.IMogoRefreshStrategyController; - -/** - * @author congtaowang - * @since 2020-03-13 - *

- * 描述 - */ -@Route( path = MogoServicePaths.PATH_REFRESH_STRATEGY_API ) -public class MogoRefreshStrategyController implements IMogoRefreshStrategyController { - - private static final String TAG = "MogoRefreshStrategyController"; - - @Override - public boolean restartAutoRefreshAtTime( int delay ) { - try { - MogoServices.getInstance().restartAutoRefreshAtTime( delay ); - return true; - } catch ( Exception e ) { - Logger.e( TAG, e, "restartAutoRefreshAtTime" ); - return false; - } - } - - @Override - public void clearAllData() { - MogoServices.getInstance().clearAllData(); - } - - @Override - public void resetLocationUpDelay(long delay) { -// MogoRTKLocation.getInstance().resetUploadDelay(delay); - } - - @Override - public void init( Context context ) { - - } -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/unwake/GlobalUnwakeConst.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/unwake/GlobalUnwakeConst.java deleted file mode 100644 index e9360d6663..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/unwake/GlobalUnwakeConst.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.mogo.module.service.unwake; - -/** - * 全局免唤醒常量类 - * - * @author tongchenfei - */ -public class GlobalUnwakeConst { - public static final String MODULE_NAME = "GlobalUnwakeManager"; - - // command - public static final String VOICE_CMD_GO_TO_SHARE = "com.zhidao.share"; - /** - * 这个是实时路况,不是拥堵,拥堵放在了extention模块里面处理 - */ - public static final String VOICE_CMD_PUB_ROAD_CONDITION = "com.zhidao.pathfinder.report.roadCondition"; - /** - * 故障求助 - */ - public static final String VOICE_CMD_PUB_TROUBLE_HELP = "com.zhidao.auxiliaryDriving" + - ".pubTroubleHelp"; - /** - * 关闭分享框 唤醒 - */ - public static final String VOICE_CMD_SHARE_DIALOG_CLOSE = "com.zhidao.share.close"; - /** - * 两次未回复关闭分享对话框 - */ - public static final String VOICE_CMD_NO_REPLY_SHARE_DIALOG_CLOSE = "com.zhidao.share.dialog" + - ".close"; - /** - * 免唤醒词上报拥堵,但是现在当唤醒词使用 - */ - public static final String UNWAKE_UPLOAD_ROAD_CONDITION = "command_upload_roadcondition"; - /** - * 免唤醒词上报实时路况 - */ - public static final String UNWAKE_UPLOAD_REAL_TIME_TRAFFIC = "command_upload_real_time_traffic"; - - /** - * 唤醒词查询出行动态 - */ - public static final String VOICE_QUERY_HISTORY_INDEX = "com.zhidao.query.trip.event"; - /** - * 唤醒词查询周边事件 - */ - public static final String VOICE_QUERY_SURROUNDING_INDEX = "com.zhidao.query.nearby.event"; - /** - * 唤醒词查询热心指数 - */ - public static final String VOICE_QUERY_HEART_INDEX = "com.zhidao.query.myshare.index"; - - // 词 - public static final String[] UPLOAD_REAL_TIME_TRAFFIC = {"上报实时路况", "上报路况"}; -} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/unwake/GlobalUnwakeManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/unwake/GlobalUnwakeManager.java deleted file mode 100644 index a138b3636e..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/unwake/GlobalUnwakeManager.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.mogo.module.service.unwake; - -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; -import static com.mogo.module.service.unwake.GlobalUnwakeConst.VOICE_CMD_GO_TO_SHARE; -import static com.mogo.module.service.unwake.GlobalUnwakeConst.VOICE_CMD_NO_REPLY_SHARE_DIALOG_CLOSE; -import static com.mogo.module.service.unwake.GlobalUnwakeConst.VOICE_CMD_PUB_ROAD_CONDITION; -import static com.mogo.module.service.unwake.GlobalUnwakeConst.VOICE_CMD_PUB_TROUBLE_HELP; -import static com.mogo.module.service.unwake.GlobalUnwakeConst.VOICE_CMD_SHARE_DIALOG_CLOSE; -import static com.mogo.module.service.unwake.GlobalUnwakeConst.VOICE_QUERY_HEART_INDEX; -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; - -/** - * 全局免唤醒管理 - * 包括唤醒词指令和全局免唤醒词指令 - * 有几个Module仅仅是因为要注册全局免唤醒词,加到了BaseModule中,为了将这部分Module从BaseModule中去掉,特抽离全局免唤醒词注册监听逻辑 - * - * @author tongchenfei - */ -@Route(path = MogoServicePaths.PATH_GLOBAL_UNWAKE) -public class GlobalUnwakeManager implements IProvider, IMogoIntentListener, IMogoVoiceCmdCallBack { - private IMogoIntentManager intentManager; - private Context context; - private static final String TAG = "GlobalUnwakeManager"; - @Override - public void init(Context context) { - Logger.d(TAG, "全局免唤醒模块初始化===="); - this.context = context; - intentManager = MogoApisHandler.getInstance().getApis().getIntentManagerApi(); - intentManager.registerIntentListener(VOICE_CMD_GO_TO_SHARE, this); - intentManager.registerIntentListener(VOICE_CMD_PUB_TROUBLE_HELP, this); - intentManager.registerIntentListener(VOICE_CMD_PUB_ROAD_CONDITION, this); - intentManager.registerIntentListener(VOICE_CMD_SHARE_DIALOG_CLOSE, this); - intentManager.registerIntentListener(VOICE_CMD_NO_REPLY_SHARE_DIALOG_CLOSE, this); - intentManager.registerIntentListener(UNWAKE_UPLOAD_ROAD_CONDITION, this); - intentManager.registerIntentListener(VOICE_QUERY_HEART_INDEX, this); - intentManager.registerIntentListener(VOICE_QUERY_HISTORY_INDEX, this); - intentManager.registerIntentListener(VOICE_QUERY_SURROUNDING_INDEX, this); - - // 免唤醒词注册,全局免唤醒 - AIAssist.getInstance(context).registerUnWakeupCommand(UNWAKE_UPLOAD_REAL_TIME_TRAFFIC, - UPLOAD_REAL_TIME_TRAFFIC, this); - } - - @Override - public void onIntentReceived(String intentStr, Intent intent) { - // 此处只接受处理语音相关广播 - Logger.d(TAG, "收到唤醒词指令: " + intentStr); - switch (intentStr) { - // 分享相关唤醒词 - case VOICE_CMD_GO_TO_SHARE: - case VOICE_CMD_PUB_TROUBLE_HELP: - case VOICE_CMD_PUB_ROAD_CONDITION: - case VOICE_CMD_SHARE_DIALOG_CLOSE: - case VOICE_CMD_NO_REPLY_SHARE_DIALOG_CLOSE: - case UNWAKE_UPLOAD_ROAD_CONDITION: - //TODO - // MogoApisHandler.getInstance().getApis().getShareManager().onGlobalUnwake(intentStr, intent); - break; - case VOICE_QUERY_HISTORY_INDEX: - Log.d("语音指令","VOICE_QUERY_HISTORY_INDEX"); - showPanelByStatus("showHistoryPanel", 0); - break; - case VOICE_QUERY_SURROUNDING_INDEX: - Log.d("语音指令","VOICE_QUERY_SURROUNDING_INDEX"); - showPanelByStatus("showSurroundingPanel", 1); - break; - case VOICE_QUERY_HEART_INDEX: - Log.d("语音指令","VOICE_QUERY_HEART_INDEX"); - showPanelByStatus("showSharePanel", 2); - break; - default: - break; - } - } - - /** - * 根据主页状态调用不同打开方式 - * @param target 面板类型 - * @param type 面板位置索引 - */ - private void showPanelByStatus(String target, int type){ - if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isMainPageOnResume() ) { - MogoApisHandler.getInstance().getApis().getEventPanelManager().showPanelWithSelectedItem(type); - } else { - Intent start = new Intent( Intent.ACTION_VIEW ); - start.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK ); - start.setData( Uri.parse( "mogo://launcher/main/switch2?type="+target ) ); - context.startActivity( start ); - } - } - - @Override - public void onCmdSelected(String cmd) { - Logger.d(TAG, "收到免唤醒词指令: " + cmd); - if (UNWAKE_UPLOAD_REAL_TIME_TRAFFIC.equals(cmd)) { - //TODO - // MogoApisHandler.getInstance().getApis().getShareManager().onGlobalUnwake(cmd, null); - } - } -} diff --git a/modules/mogo-module-service/src/main/res/layout/module_services_fragment_online_car_panel.xml b/modules/mogo-module-service/src/main/res/layout/module_services_fragment_online_car_panel.xml deleted file mode 100644 index d4db9fff7c..0000000000 --- a/modules/mogo-module-service/src/main/res/layout/module_services_fragment_online_car_panel.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-service/src/main/res/layout/module_services_online_car_panel_item.xml b/modules/mogo-module-service/src/main/res/layout/module_services_online_car_panel_item.xml deleted file mode 100644 index 1e91684d50..0000000000 --- a/modules/mogo-module-service/src/main/res/layout/module_services_online_car_panel_item.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-service/src/main/res/layout/module_services_status_panel.xml b/modules/mogo-module-service/src/main/res/layout/module_services_status_panel.xml deleted file mode 100644 index 142c68f1d7..0000000000 --- a/modules/mogo-module-service/src/main/res/layout/module_services_status_panel.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/services/mogo-service-api/src/main/java/com/mogo/service/IMogoServiceApis.java b/services/mogo-service-api/src/main/java/com/mogo/service/IMogoServiceApis.java index 6cf1037f0a..f3d50502f0 100644 --- a/services/mogo-service-api/src/main/java/com/mogo/service/IMogoServiceApis.java +++ b/services/mogo-service-api/src/main/java/com/mogo/service/IMogoServiceApis.java @@ -126,13 +126,6 @@ public interface IMogoServiceApis extends IProvider { */ IMogoActionManager getActionManagerApi(); - /** - * 获取刷新策略控制接口 - * - * @return - */ - IMogoRefreshStrategyController getRefreshStrategyControllerApi(); - /** * 获取顶部1/2屏界面管理类 diff --git a/services/mogo-service/src/main/java/com/mogo/service/impl/MogoServiceApis.java b/services/mogo-service/src/main/java/com/mogo/service/impl/MogoServiceApis.java index 41daf61430..542374c80b 100644 --- a/services/mogo-service/src/main/java/com/mogo/service/impl/MogoServiceApis.java +++ b/services/mogo-service/src/main/java/com/mogo/service/impl/MogoServiceApis.java @@ -120,11 +120,6 @@ public class MogoServiceApis implements IMogoServiceApis { return getApiInstance(IMogoActionManager.class, MogoServicePaths.PATH_ACTION_APIS); } - @Override - public IMogoRefreshStrategyController getRefreshStrategyControllerApi() { - return getApiInstance(IMogoRefreshStrategyController.class, MogoServicePaths.PATH_REFRESH_STRATEGY_API); - } - @Override public IMogoTopViewManager getTopViewManager() { return getApiInstance(IMogoTopViewManager.class, MogoServicePaths.PATH_EXTENSIONS_TOP_VIEW_MANAGER); diff --git a/services/mogo-service/src/main/java/com/mogo/service/impl/adas/MogoADASController.java b/services/mogo-service/src/main/java/com/mogo/service/impl/adas/MogoADASController.java index b8c55e4d11..27113f4841 100644 --- a/services/mogo-service/src/main/java/com/mogo/service/impl/adas/MogoADASController.java +++ b/services/mogo-service/src/main/java/com/mogo/service/impl/adas/MogoADASController.java @@ -230,7 +230,7 @@ public class MogoADASController implements IMogoADASController { @Override public void changeAdasControlMode(EnumMapUI ui) { - if (ui == null || !DebugConfig.isMapBased()) { + if (ui == null ) { return; } Logger.d(TAG, "new Mode: " + ui.name()); diff --git a/services/mogo-service/src/main/java/com/mogo/service/impl/network/MogoNetWorkService.java b/services/mogo-service/src/main/java/com/mogo/service/impl/network/MogoNetWorkService.java index 5f4351d0f9..0343ebd25c 100644 --- a/services/mogo-service/src/main/java/com/mogo/service/impl/network/MogoNetWorkService.java +++ b/services/mogo-service/src/main/java/com/mogo/service/impl/network/MogoNetWorkService.java @@ -5,7 +5,7 @@ import android.content.Context; import com.alibaba.android.arouter.facade.annotation.Route; import com.mogo.eagle.core.data.constants.MogoServicePaths; -import com.mogo.eagle.core.network.RetrofitFactory; +import com.mogo.eagle.core.network.MoGoRetrofitFactory; import com.mogo.service.network.IMogoNetwork; /** @@ -23,12 +23,12 @@ public class MogoNetWorkService implements IMogoNetwork { @Override public T create(Class service, String baseUrl) { - return RetrofitFactory.getInstance(baseUrl).create(service); + return MoGoRetrofitFactory.getInstance(baseUrl).create(service); } @Override public T createNoCallAdapter(Class service, String baseUrl) { - return RetrofitFactory.getInstanceNoCallAdapter(baseUrl).create(service); + return MoGoRetrofitFactory.getInstanceNoCallAdapter(baseUrl).create(service); } }