修复OCH反向来问题

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-11-03 20:36:53 +08:00
parent f5f7cc6c9c
commit 26b4fac333
15 changed files with 200 additions and 164 deletions

1
.idea/misc.xml generated
View File

@@ -16,6 +16,7 @@
<entry key="OCH/mogo-och-bus/src/main/res/layout/item_och_bus_station.xml" value="0.3385416666666667" />
<entry key="OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml" value="0.24010416666666667" />
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml" value="1.0" />
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/notification_v2x_msg_vr.xml" value="0.1734375" />
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_autopilot_status.xml" value="0.25833333333333336" />
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_check_status.xml" value="1.0" />
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml" value="0.46307692307692305" />

View File

@@ -53,6 +53,7 @@ dependencies {
implementation rootProject.ext.dependencies.modulecommon
implementation rootProject.ext.dependencies.mogo_core_data
implementation rootProject.ext.dependencies.mogo_core_function_api
} else {
implementation project(":OCH:mogo-och")
implementation project(":foudations:mogo-utils")
@@ -60,6 +61,7 @@ dependencies {
implementation project(":modules:mogo-module-common")
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-function-api')
}
}

View File

@@ -2,11 +2,14 @@ package com.mogo.och.bus;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.och.IMogoOCH;
import com.mogo.och.OCHConstants;
import com.mogo.och.bus.fragment.OchBusFragment;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
@@ -20,20 +23,12 @@ import com.mogo.utils.logger.Logger;
* @author tongchenfei
*/
@Route(path = OCHConstants.PATH)
public class OchBusProvider implements IMogoOCH {
public class OchBusProvider implements IMoGoFunctionProvider {
private static final String TAG = "OchBusProvider";
private OchBusFragment busFragment;
private int containerId;
private FragmentActivity activity;
@Override
public void init(FragmentActivity activity, int containerId) {
this.containerId = containerId;
this.activity = activity;
UiThreadHandler.postDelayed(this::stepIntoVrMode, 5_000L );
}
/**
* 进入鹰眼模式,设置手势缩放地图失效
*/
@@ -87,4 +82,24 @@ public class OchBusProvider implements IMogoOCH {
}
};
@Nullable
@Override
public Fragment createCoverage(@Nullable FragmentActivity activity, @Nullable Integer containerId) {
this.containerId = containerId;
this.activity = activity;
UiThreadHandler.postDelayed(this::stepIntoVrMode, 5_000L );
return null;
}
@NonNull
@Override
public String getFunctionName() {
return TAG;
}
@Override
public void onDestroy() {
}
}

View File

@@ -46,12 +46,15 @@ dependencies {
implementation rootProject.ext.dependencies.mogocommons
implementation rootProject.ext.dependencies.mogo_core_data
implementation rootProject.ext.dependencies.mogo_core_function_api
} else {
implementation project(":OCH:mogo-och")
implementation project(":foudations:mogo-utils")
implementation project(":foudations:mogo-commons")
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-function-api')
}
}

View File

@@ -1,30 +1,50 @@
package com.mogo.och.bus;
import android.content.Context;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.mogo.och.IMogoOCH;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
import com.mogo.och.OCHConstants;
import com.mogo.utils.logger.Logger;
public
/**
* @author congtaowang
* @since 2021/1/15
* <p>
* 描述
*/
class MogoOCHNoop implements IMogoOCH {
@Route(path = OCHConstants.PATH)
public class MogoOCHNoop implements IMoGoFunctionProvider {
private static final String TAG = "MogoOCHNoop";
@Override
public void init( FragmentActivity activity, int containerId ) {
Logger.d( TAG, "noop-" );
public void init(Context context) {
Logger.d(TAG, "noop-");
}
@Nullable
@Override
public Fragment createCoverage(@Nullable FragmentActivity activity, @Nullable Integer containerId) {
Logger.d(TAG, "noop-");
return null;
}
@NonNull
@Override
public String getFunctionName() {
return TAG;
}
@Override
public void init( Context context ) {
Logger.d( TAG, "noop-" );
public void onDestroy() {
}
}

View File

@@ -49,6 +49,7 @@ dependencies {
implementation rootProject.ext.dependencies.modulecommon
implementation rootProject.ext.dependencies.mogo_core_data
implementation rootProject.ext.dependencies.mogo_core_function_api
} else {
implementation project(":OCH:mogo-och")
implementation project(":foudations:mogo-utils")
@@ -56,6 +57,7 @@ dependencies {
implementation project(":modules:mogo-module-common")
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-function-api')
}
}

View File

@@ -2,11 +2,14 @@ package com.mogo.och.taxi;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.och.IMogoOCH;
import com.mogo.och.OCHConstants;
import com.mogo.och.taxi.ui.OCHTaxiFragment;
import com.mogo.och.taxi.ui.OCHTaxiUiController;
@@ -15,38 +18,26 @@ import com.mogo.service.statusmanager.StatusDescriptor;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.logger.Logger;
public
/**
* @author congtaowang
* @since 2021/1/15
* <p>
* 网约车-出租车
*/
@Route( path = OCHConstants.PATH )
class MogoOCHTaxi implements IMogoOCH , IMogoStatusChangedListener {
@Route(path = OCHConstants.PATH)
public class MogoOCHTaxi implements IMoGoFunctionProvider, IMogoStatusChangedListener {
private static final String TAG = "MogoOCHTaxi";
private OCHTaxiFragment ochTaxiFragment;
private FragmentActivity mActivity;
private int mContainerId;
@Override
public void init( FragmentActivity activity, int containerId ) {
this.mActivity = activity;
this.mContainerId = containerId;
// MogoOCHTaxiModel.getInstance().init( activity.getApplicationContext() );
OCHTaxiUiController.getInstance().init( activity, containerId );
UiThreadHandler.postDelayed( () -> {
OCHTaxiUiController.getInstance().stepIntoVrMode();
}, 5_000L );
}
@Override
public void init( Context context ) {
Logger.d( TAG, "init" );
MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("ochTaxi", StatusDescriptor.VR_MODE,this);
MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("ochTaxi", StatusDescriptor.TOP_VIEW,this);
public void init(Context context) {
Logger.d(TAG, "init");
MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("ochTaxi", StatusDescriptor.VR_MODE, this);
MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("ochTaxi", StatusDescriptor.TOP_VIEW, this);
}
private void showFragment() {
@@ -60,21 +51,47 @@ class MogoOCHTaxi implements IMogoOCH , IMogoStatusChangedListener {
mActivity.getSupportFragmentManager().beginTransaction().show(ochTaxiFragment).commitAllowingStateLoss();
}
private void hideFragment(){
if (ochTaxiFragment != null){
private void hideFragment() {
if (ochTaxiFragment != null) {
mActivity.getSupportFragmentManager().beginTransaction().hide(ochTaxiFragment).commitAllowingStateLoss();
}
}
@Override
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
if (descriptor == StatusDescriptor.VR_MODE){
if (isTrue){
if (descriptor == StatusDescriptor.VR_MODE) {
if (isTrue) {
showFragment();
MogoOCHTaxiModel.getInstance().init( mActivity.getApplicationContext() );
}else {
MogoOCHTaxiModel.getInstance().init(mActivity.getApplicationContext());
} else {
hideFragment();
}
}
}
@Nullable
@Override
public Fragment createCoverage(@Nullable FragmentActivity activity, @Nullable Integer containerId) {
this.mActivity = activity;
this.mContainerId = containerId;
// MogoOCHTaxiModel.getInstance().init( activity.getApplicationContext() );
OCHTaxiUiController.getInstance().init(activity, containerId);
UiThreadHandler.postDelayed(() -> {
OCHTaxiUiController.getInstance().stepIntoVrMode();
}, 5_000L);
return null;
}
@NonNull
@Override
public String getFunctionName() {
return TAG;
}
@Override
public void onDestroy() {
}
}

View File

@@ -1,24 +0,0 @@
package com.mogo.och;
import androidx.annotation.IdRes;
import androidx.fragment.app.FragmentActivity;
import com.alibaba.android.arouter.facade.template.IProvider;
public
/**
* @author congtaowang
* @since 2021/1/15
*
* 网约车抽象接口
*/
interface IMogoOCH extends IProvider {
/**
* 初始化网约车容器
*
* @param activity
* @param containerId 容器ID
*/
void init( FragmentActivity activity, @IdRes int containerId );
}

View File

@@ -1,9 +1,9 @@
package com.mogo.eagle.core.function.hmi.warning
import android.content.Context
import android.os.Bundle
import android.util.Log
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.data.enums.WarningDirectionEnum
@@ -30,7 +30,7 @@ class MoGoWarningProvider : IMoGoWaringProvider {
mContext = context
}
override fun createCoverage(context: Context?, data: Bundle?): Fragment? {
override fun createCoverage(activity: FragmentActivity?, containerId: Int?): Fragment? {
Logger.d(TAG, "初始化蘑菇预警模块 Fragment……")
mMoGoHmiFragment = MoGoHmiFragment()
return mMoGoHmiFragment

View File

@@ -137,7 +137,7 @@ public class SmallMapProvider implements IMogoSmallMapProvider, IMogoStatusChang
@Nullable
@Override
public Fragment createCoverage(@Nullable Context context, @Nullable Bundle data) {
public Fragment createCoverage(@Nullable FragmentActivity activity, @Nullable Integer containerId) {
return null;
}

View File

@@ -1,9 +1,9 @@
package com.mogo.eagle.core.function.api.base
import android.content.Context
import android.os.Bundle
import android.util.Log
import androidx.annotation.IdRes
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import com.alibaba.android.arouter.facade.template.IProvider
/**
@@ -15,10 +15,10 @@ interface IMoGoFunctionProvider : IProvider {
/**
* 创建图层如果功能需要在HMI单独创建新的图层才需要实现
*
* @param context 上下文
* @param activity 上下文
* @return 图层Fragment
*/
fun createCoverage(context: Context?, data: Bundle?): Fragment?
fun createCoverage(activity: FragmentActivity?, @IdRes containerId: Int?): Fragment?
/**
* 功能模块唯一标识

View File

@@ -37,14 +37,14 @@ kapt.include.compile.classpath=false
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.jetifier.blacklist=module-service-2.0.63.aar
android.jetifier.blacklist=module-service-2.0.64.aar
## maven 配置
RELEASE_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-releases/
SNAPSHOT_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-snapshots/
USERNAME=xintai
PASSWORD=xintai2018
# 编译模式: false - 依赖本地版本, true - 依赖 maven 版本
USE_MAVEN_PACKAGE=false
USE_MAVEN_PACKAGE=true
##plugin 插件
#android.enableR8.libraries=false
#android.enableR8=false
@@ -88,103 +88,103 @@ applicationName=IntelligentPilot
versionCode=80007
versionName=8.0.14
################# 新架构模块Maven版本管理 #################
MOGO_CORE_FUNCTION_HMI_VERSION_VERSION=0.0.6
MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.6
MOGO_CORE_FUNCTION_CHECK_VERSION=0.0.6
MOGO_CORE_FUNCTION_HMI_VERSION=0.0.6
MOGO_CORE_FUNCTION_MAP_VERSION=0.0.6
MOGO_CORE_FUNCTION_MONITORING_VERSION=0.0.6
MOGO_CORE_FUNCTION_NOTICE_VERSION=0.0.6
MOGO_CORE_FUNCTION_OBU_MOGO_VERSION=0.0.6
MOGO_CORE_FUNCTION_SMP_VERSION=0.0.6
MOGO_CORE_FUNCTION_V2X_VERSION=0.0.6
MOGO_CORE_DATA_VERSION=0.0.6
MOGO_CORE_FUNCTION_API_VERSION=0.0.6
MOGO_CORE_FUNCTION_CALL_VERSION=0.0.6
MOGO_CORE_RES_VERSION=0.0.6
MOGO_CORE_UTILS_VERSION=0.0.6
MOGO_CORE_NETWORK_VERSION=0.0.6
MOGO_CORE_FUNCTION_HMI_VERSION_VERSION=0.0.7
MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.7
MOGO_CORE_FUNCTION_CHECK_VERSION=0.0.7
MOGO_CORE_FUNCTION_HMI_VERSION=0.0.7
MOGO_CORE_FUNCTION_MAP_VERSION=0.0.7
MOGO_CORE_FUNCTION_MONITORING_VERSION=0.0.7
MOGO_CORE_FUNCTION_NOTICE_VERSION=0.0.7
MOGO_CORE_FUNCTION_OBU_MOGO_VERSION=0.0.7
MOGO_CORE_FUNCTION_SMP_VERSION=0.0.7
MOGO_CORE_FUNCTION_V2X_VERSION=0.0.7
MOGO_CORE_DATA_VERSION=0.0.7
MOGO_CORE_FUNCTION_API_VERSION=0.0.7
MOGO_CORE_FUNCTION_CALL_VERSION=0.0.7
MOGO_CORE_RES_VERSION=0.0.7
MOGO_CORE_UTILS_VERSION=0.0.7
MOGO_CORE_NETWORK_VERSION=0.0.7
################# 旧版本架构模块版本 #################
## 工程内模块
MOGO_COMMONS_VERSION=2.0.63
MOGO_UTILS_VERSION=2.0.63
MAP_AMAP_VERSION=2.0.63
MAP_AUTONAVI_VERSION=2.0.63
MOGO_MAP_VERSION=2.0.63
MOGO_MAP_API_VERSION=2.0.63
MOGO_SERVICE_VERSION=2.0.63
MOGO_SERVICE_API_VERSION=2.0.63
MOGO_CONNECTION_VERSION=2.0.63
MOGO_MODULE_APPS_VERSION=2.0.63
MOGO_MODULE_NAVI_VERSION=2.0.63
MOGO_MODULE_SHARE_VERSION=2.0.63
MOGO_MODULE_COMMON_VERSION=2.0.63
MOGO_MODULE_MAIN_VERSION=2.0.63
MOGO_MODULE_MAP_VERSION=2.0.63
MOGO_MODULE_SERVICE_VERSION=2.0.63
MOGO_MODULE_EXTENSIONS_VERSION=2.0.63
MOGO_MODULE_SEARCH_VERSION=2.0.63
MOGO_MODULE_BACK_VERSION=2.0.63
MOGO_MODULE_MAIN_LAUNCHER_VERSION=2.0.63
MOGO_MODULE_V2X_VERSION=2.0.63
MOGO_COMMONS_VERSION=2.0.64
MOGO_UTILS_VERSION=2.0.64
MAP_AMAP_VERSION=2.0.64
MAP_AUTONAVI_VERSION=2.0.64
MOGO_MAP_VERSION=2.0.64
MOGO_MAP_API_VERSION=2.0.64
MOGO_SERVICE_VERSION=2.0.64
MOGO_SERVICE_API_VERSION=2.0.64
MOGO_CONNECTION_VERSION=2.0.64
MOGO_MODULE_APPS_VERSION=2.0.64
MOGO_MODULE_NAVI_VERSION=2.0.64
MOGO_MODULE_SHARE_VERSION=2.0.64
MOGO_MODULE_COMMON_VERSION=2.0.64
MOGO_MODULE_MAIN_VERSION=2.0.64
MOGO_MODULE_MAP_VERSION=2.0.64
MOGO_MODULE_SERVICE_VERSION=2.0.64
MOGO_MODULE_EXTENSIONS_VERSION=2.0.64
MOGO_MODULE_SEARCH_VERSION=2.0.64
MOGO_MODULE_BACK_VERSION=2.0.64
MOGO_MODULE_MAIN_LAUNCHER_VERSION=2.0.64
MOGO_MODULE_V2X_VERSION=2.0.64
# 探路
MOGO_MODULE_TANLU_VERSION=2.0.63
MOGO_MODULE_TANLU_VERSION=2.0.64
# 推送
MOGO_MODULE_PUSH_VERSION=2.0.63
MOGO_MODULE_PUSH_BASE_VERSION=2.0.63
MOGO_MODULE_PUSH_NOOP_VERSION=2.0.63
MOGO_MODULE_PUSH_VERSION=2.0.64
MOGO_MODULE_PUSH_BASE_VERSION=2.0.64
MOGO_MODULE_PUSH_NOOP_VERSION=2.0.64
# 探路上报和分享模块
TANLULIB_VERSION=2.0.63
MOGO_TANLU_API_VERSION=2.0.63
TANLULIB_VERSION=2.0.64
MOGO_TANLU_API_VERSION=2.0.64
#左侧面板模块
MOGO_MODULE_LEFT_PANEL_VERSION=2.0.63
MOGO_MODULE_LEFT_PANEL_NOOP_VERSION=2.0.63
MOGO_MODULE_LEFT_PANEL_VERSION=2.0.64
MOGO_MODULE_LEFT_PANEL_NOOP_VERSION=2.0.64
# 小控件
MOGO_MODULE_WIDGETS_VERSION=2.0.63
MOGO_MODULE_WIDGETS_VERSION=2.0.64
# obu
MOGO_MODULE_OBU_VERSION=2.0.63
MOGO_MODULE_OBU_MOGO_VERSION=2.0.63
MOGO_MODULE_OBU_VERSION=2.0.64
MOGO_MODULE_OBU_MOGO_VERSION=2.0.64
# monitor
MOGO_MODULE_MONITOR_VERSION=2.0.63
MOGO_MODULE_MONITOR_VERSION=2.0.64
# bugly
CRASHREPORT_VERSION=2.0.63
CRASHREPORT_BUGLY_VERSION=2.0.63
CRASHREPORT_NOOP_VERSION=2.0.63
CRASHREPORT_UPGRADE_VERSION=2.0.63
CRASHREPORT_VERSION=2.0.64
CRASHREPORT_BUGLY_VERSION=2.0.64
CRASHREPORT_NOOP_VERSION=2.0.64
CRASHREPORT_UPGRADE_VERSION=2.0.64
## tts
TTS_BASE_VERSION=2.0.63
TTS_DI_VERSION=2.0.63
TTS_ZHI_VERSION=2.0.63
TTS_PAD_VERSION=2.0.63
TTS_NOOP_VERSION=2.0.63
TTS_BASE_VERSION=2.0.64
TTS_DI_VERSION=2.0.64
TTS_ZHI_VERSION=2.0.64
TTS_PAD_VERSION=2.0.64
TTS_NOOP_VERSION=2.0.64
# 自研地图
MAP_CUSTOM_VERSION=2.0.63
MOGO_MODULE_ADAS_VERSION=2.0.63
MAP_CUSTOM_VERSION=2.0.64
MOGO_MODULE_ADAS_VERSION=2.0.64
# 基础服务实现passport、socket、location
MOGO_BASE_WEBSOCKET_SDK_VERSION=2.0.63
MOGO_BASE_SERVICES_APK_VERSION=2.0.63
MOGO_BASE_SERVICES_SDK_VERSION=2.0.63
MOGO_MODULE_CHAT_VERSION=2.0.63
MOGO_BASE_WEBSOCKET_SDK_VERSION=2.0.64
MOGO_BASE_SERVICES_APK_VERSION=2.0.64
MOGO_BASE_SERVICES_SDK_VERSION=2.0.64
MOGO_MODULE_CHAT_VERSION=2.0.64
# 车聊聊
MOGO_MODULE_CARCHATTING_VERSION=2.0.63
MOGO_MODULE_CARCHATTING_VERSION=2.0.64
# 车聊聊接口
MOGO_MODULE_CARCHATTINGPROVIDER_VERSION=2.0.63
MOGO_MODULE_CARCHATTINGPROVIDER_VERSION=2.0.64
# 皮肤
MOGO_SKIN_SUPPORT_VERSION=2.0.63
MOGO_SKIN_LIGHT_VERSION=2.0.63
MOGO_SKIN_SUPPORT_IMPL_VERSION=2.0.63
MOGO_SKIN_SUPPORT_NOOP_VERSION=2.0.63
SKIN_SUPPORT_VERSION=2.0.63
SKIN_SUPPORT_APPCOMPAT_VERSION=2.0.63
SKIN_SUPPORT_CARDVIEW_VERSION=2.0.63
SKIN_SUPPORT_CONSTRAINT_LAYOUT_VERSION=2.0.63
SKIN_SUPPORT_DESIGN_VERSION=2.0.63
MOGO_SKIN_SUPPORT_VERSION=2.0.64
MOGO_SKIN_LIGHT_VERSION=2.0.64
MOGO_SKIN_SUPPORT_IMPL_VERSION=2.0.64
MOGO_SKIN_SUPPORT_NOOP_VERSION=2.0.64
SKIN_SUPPORT_VERSION=2.0.64
SKIN_SUPPORT_APPCOMPAT_VERSION=2.0.64
SKIN_SUPPORT_CARDVIEW_VERSION=2.0.64
SKIN_SUPPORT_CONSTRAINT_LAYOUT_VERSION=2.0.64
SKIN_SUPPORT_DESIGN_VERSION=2.0.64
# OCH
MOGO_OCH_VERSION=2.0.63
MOGO_OCH_BUS_VERSION=2.0.63
MOGO_OCH_NOOP_VERSION=2.0.63
MOGO_OCH_TAXI_VERSION=2.0.63
MOGO_OCH_VERSION=2.0.64
MOGO_OCH_BUS_VERSION=2.0.64
MOGO_OCH_NOOP_VERSION=2.0.64
MOGO_OCH_TAXI_VERSION=2.0.64
# mogoAiCloud sdk services
MOGO_AICLOUD_SERVICES_SDK_VERSION=2.0.63
MOGO_AICLOUD_SERVICES_SDK_VERSION=2.0.64
################# 旧版本架构模块版本 #################

View File

@@ -52,12 +52,10 @@ dependencies {
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
api rootProject.ext.dependencies.modulemain
implementation rootProject.ext.dependencies.mogooch
implementation rootProject.ext.dependencies.moduleservice
implementation rootProject.ext.dependencies.mogo_core_function_smp
} else {
api project(":modules:mogo-module-main")
implementation project(":OCH:mogo-och")
implementation project(':modules:mogo-module-service')
implementation project(':core:function-impl:mogo-core-function-smp')
}

View File

@@ -1,10 +1,10 @@
package com.zhidao.mogo.module.main.launcher;
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_NON;
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_BOTTOM;
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_BOTTOM_LEFT;
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_BOTTOM_RIGHT;
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_LEFT;
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_NON;
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_RIGHT;
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_TOP;
@@ -21,14 +21,14 @@ import androidx.annotation.Nullable;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider;
import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.main.MainActivity;
import com.mogo.module.main.cards.MogoModulesManager;
import com.mogo.module.service.receiver.MogoReceiver;
import com.mogo.och.IMogoOCH;
import com.mogo.service.intent.IMogoIntentListener;
import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider;
import com.mogo.service.statusmanager.StatusDescriptor;
import com.mogo.service.v2x.IV2XWarningListener;
import com.mogo.utils.ActivityLifecycleManager;
@@ -131,9 +131,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
* 加载网约车模块
*/
private void loadOCHModule() {
IMogoOCH och = ARouter.getInstance().navigation(IMogoOCH.class);
if (och != null) {
och.init(this, R.id.module_main_id_och_fragment);
IMoGoFunctionProvider ochProvider = (IMoGoFunctionProvider) ARouter.getInstance()
.build("/och/api")
.navigation(getContext());
if (ochProvider != null) {
ochProvider.createCoverage(this, R.id.module_main_id_och_fragment);
}
}

View File

@@ -244,7 +244,7 @@ public class MogoModulesManager implements MogoModulesHandler {
}
Fragment fragment = mActivity.getSupportFragmentManager().findFragmentByTag( provider.getFunctionName() );
if ( fragment == null ) {
fragment = provider.createCoverage( getContext(), null );
fragment = provider.createCoverage( mActivity, null );
}
if ( fragment == null ) {
Logger.e( TAG, "add fragment fail cause fragment == null, container is %s", ResourcesHelper.getResNameById( getApplicationContext(), containerId ) );