Merge remote-tracking branch 'origin/dev' into dev
@@ -30,7 +30,6 @@ import com.mogo.test.crashreport.ITestCrashReportProvider;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.LogLevel;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.storage.SharedPrefsMgr;
|
||||
import com.squareup.leakcanary.LeakCanary;
|
||||
import com.zhidao.boot.persistent.lib.PersistentManager;
|
||||
import com.zhidao.mogo.module.left.panel.LeftPanelConst;
|
||||
@@ -64,11 +63,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
crashSystem.setDebug( BuildConfig.DEBUG );
|
||||
Logger.init( BuildConfig.DEBUG ? LogLevel.DEBUG : LogLevel.OFF );
|
||||
|
||||
if ( DebugConfig.isLoadGuideModule() ) {
|
||||
MogoModulePaths.addModule( new MogoModule( PATH_GUIDE_FRAGMENT, PATH_GUIDE_MODULE_NAME ) );
|
||||
}else{
|
||||
SharedPrefsMgr.getInstance(this).putBoolean(DebugConfig.getSpGuide(),true);
|
||||
}
|
||||
MogoModulePaths.addModule( new MogoModule( PATH_GUIDE_FRAGMENT, PATH_GUIDE_MODULE_NAME ) );
|
||||
MogoModulePaths.addModule( new MogoModule( MogoServicePaths.PATH_AGREEMENT, AuthorizeConstant.PATH_AGREEMENT_MODULE_NAME ) );
|
||||
|
||||
if ( DebugConfig.isLauncher() ) {
|
||||
@@ -129,7 +124,6 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
DebugConfig.setProductFlavor( BuildConfig.FLAVOR_product );
|
||||
DebugConfig.setSocketAppId( BuildConfig.SOCKET_APP_ID );
|
||||
DebugConfig.setRoadEventAnimated( BuildConfig.ROAD_EVENT_ANIMATED );
|
||||
DebugConfig.setLoadGuideModule( BuildConfig.LOAD_GUIDE_MODULE );
|
||||
DebugConfig.setSkinSupported( BuildConfig.IS_SKIN_SUPPORTED );
|
||||
DebugConfig.setSupportedSearchDestinationOnlineCarList( BuildConfig.IS_SUPPORTED_SEARCH_DESTINATION_ONLINE_CAR_LIST );
|
||||
DebugConfig.setScheduleCalculateNotHomeCompanyDistanceForPush( BuildConfig.IS_SUPPORT_SCHEDULE_CALCULATE_NOT_HOME_COMPANY_DISTANCE_FOR_PUSH );
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mogo.commons.context;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
public class ContextHolderUtil {
|
||||
|
||||
private static Context mContext;
|
||||
|
||||
public static void holdContext(Context context) {
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
public static void releaseContext() {
|
||||
mContext = null;
|
||||
}
|
||||
|
||||
public static Context getContext(){
|
||||
return mContext;
|
||||
}
|
||||
}
|
||||
@@ -251,17 +251,6 @@ public class DebugConfig {
|
||||
DebugConfig.sRoadEventAnimated = sRoadEventAnimated;
|
||||
}
|
||||
|
||||
|
||||
private static boolean sLoadGuideModule = false;
|
||||
|
||||
public static void setLoadGuideModule( boolean sLoadGuideModule ) {
|
||||
DebugConfig.sLoadGuideModule = sLoadGuideModule;
|
||||
}
|
||||
|
||||
public static boolean isLoadGuideModule() {
|
||||
return sLoadGuideModule;
|
||||
}
|
||||
|
||||
private static String SP_GUIDE = "SP_GUIDE_2020_09_09";
|
||||
|
||||
public static String getSpGuide() {
|
||||
|
||||
@@ -29,14 +29,14 @@ PASSWORD=xintai2018
|
||||
RELEASE=false
|
||||
# 模块版本
|
||||
## 工程内模块
|
||||
MOGO_COMMONS_VERSION=2.0.0
|
||||
MOGO_COMMONS_VERSION=2.0.2
|
||||
MOGO_UTILS_VERSION=2.0.0
|
||||
MAP_AMAP_VERSION=2.0.0
|
||||
MAP_AUTONAVI_VERSION=2.0.0
|
||||
MOGO_MAP_VERSION=2.0.0
|
||||
MOGO_MAP_API_VERSION=2.0.0
|
||||
MOGO_SERVICE_VERSION=2.0.0
|
||||
MOGO_SERVICE_API_VERSION=2.0.0
|
||||
MOGO_SERVICE_API_VERSION=2.0.2
|
||||
MOGO_CONNECTION_VERSION=2.0.0
|
||||
MOGO_MODULE_APPS_VERSION=2.0.0
|
||||
MOGO_MODULE_NAVI_VERSION=2.0.0
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.module.authorize.authprovider.launcher
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Looper
|
||||
import com.mogo.commons.context.ContextHolderUtil
|
||||
import com.mogo.module.authorize.authprovider.biz.MogoAuthorizeManagerImpl
|
||||
import com.mogo.module.authorize.authprovider.biz.MogoAuthorizeRegisterHandler
|
||||
import com.mogo.module.authorize.authprovider.invoke.AuthorizeInvokerConstant.Companion.AUTHORIZE_TYPE_LAUNCHER_MAIN
|
||||
@@ -82,7 +83,7 @@ class MogoMainAuthorize private constructor() : MogoAuthorizeManagerImpl(), IMog
|
||||
return
|
||||
}
|
||||
if (authorizeDialog == null) {
|
||||
authorizeDialog = AuthorizeDialog(tag, mContext!!)
|
||||
authorizeDialog = AuthorizeDialog(tag, ContextHolderUtil.getContext() ?: mContext!!)
|
||||
authorizeDialog!!.setOnDismissListener {
|
||||
authorizeDialog = null
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.module.authorize.layout
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.text.Html
|
||||
import android.view.View
|
||||
import android.widget.Button
|
||||
@@ -207,4 +206,9 @@ class AuthorizeDialog : BaseFloatDialog, View.OnClickListener, IVoiceCommandList
|
||||
showAuthorizationError()
|
||||
})
|
||||
}
|
||||
|
||||
override fun dismiss() {
|
||||
super.dismiss()
|
||||
mContext = null
|
||||
}
|
||||
}
|
||||
@@ -5,17 +5,14 @@ import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
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.guide.GuideConstant.Companion.PATH_GUIDE_FRAGMENT
|
||||
import com.mogo.module.guide.GuideConstant.Companion.PATH_GUIDE_MODULE_NAME
|
||||
import com.mogo.module.guide.util.isDeviceOfD
|
||||
import com.mogo.service.module.IMogoModuleProvider
|
||||
import com.mogo.service.module.ModuleType
|
||||
import com.mogo.utils.UiThreadHandler
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
@Route(path = PATH_GUIDE_FRAGMENT)
|
||||
@@ -58,12 +55,7 @@ class MogoGuideProvider : IMogoModuleProvider {
|
||||
|
||||
override fun init(context: Context?) {
|
||||
Logger.d("MogoGuideProvider", "init====")
|
||||
// if (DebugConfig.isLoadGuideModule()) {
|
||||
GuideBizManager.init()
|
||||
// } else {
|
||||
// Logger.d("MogoGuideProvider", "device type is not D")
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
override fun getAppPackage(): String? {
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</LinearLayout>
|
||||
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 635 B After Width: | Height: | Size: 635 B |
|
Before Width: | Height: | Size: 713 B After Width: | Height: | Size: 713 B |
|
After Width: | Height: | Size: 334 KiB |
|
After Width: | Height: | Size: 309 KiB |
|
After Width: | Height: | Size: 323 KiB |
|
After Width: | Height: | Size: 451 KiB |
|
After Width: | Height: | Size: 419 KiB |
|
After Width: | Height: | Size: 749 B |
|
After Width: | Height: | Size: 820 B |
|
After Width: | Height: | Size: 816 KiB |
|
After Width: | Height: | Size: 757 KiB |
|
After Width: | Height: | Size: 844 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@@ -10,6 +10,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.context.ContextHolderUtil;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.MvpActivity;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
@@ -131,6 +132,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
@Override
|
||||
protected void onCreate( @Nullable Bundle savedInstanceState ) {
|
||||
super.onCreate( savedInstanceState );
|
||||
ContextHolderUtil.holdContext(this);
|
||||
mPresenter.postLoadModuleMsg();
|
||||
}
|
||||
|
||||
@@ -140,6 +142,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
}
|
||||
mServiceApis.getShareManager().resetContext( this );
|
||||
mServiceApis.getAuthManagerApi().showAuth( this );
|
||||
|
||||
mMogoStatusManager = mServiceApis.getStatusManagerApi();
|
||||
mMogoStatusManager.setMainPageLaunchedStatus( TAG, true );
|
||||
AutopilotServiceManage.getInstance().init( getContext() );
|
||||
@@ -353,5 +356,6 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
mServiceApis.getRefreshStrategyControllerApi().clearAllData();
|
||||
AIAssist.getInstance( this ).release();
|
||||
mServiceApis.getOnlineCarPanelApi().clear();
|
||||
ContextHolderUtil.releaseContext();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.service.module.IMogoSearchManager;
|
||||
import com.mogo.service.share.IMogoShareManager;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.strategy.IMogoOnlineCarListPanelProvider;
|
||||
import com.mogo.service.strategy.IMogoRefreshStrategyController;
|
||||
import com.mogo.service.share.IMogoTanluProvider;
|
||||
import com.mogo.service.windowview.IMogoTopViewManager;
|
||||
@@ -76,6 +77,7 @@ public class V2XServiceManager {
|
||||
private static IMogoADASController mIMogoADASController;
|
||||
private static IMogoIntentManager mMogoIntentManager;
|
||||
private static IMogoEntranceButtonController mMogoEntranceButtonController;
|
||||
private static IMogoOnlineCarListPanelProvider mMogoOnlineCarListPanelProvider;
|
||||
|
||||
private static V2XRefreshModel mV2XRefreshModel;
|
||||
private static V2XMarkerService mV2XMarkerService;
|
||||
@@ -113,6 +115,7 @@ public class V2XServiceManager {
|
||||
mIMogoMarkerService = mMogoServiceApis.getMarkerService();
|
||||
mIMogoShareManager = mMogoServiceApis.getShareManager();
|
||||
mIMogoTanluProvider = mMogoServiceApis.getTanluApi();
|
||||
mMogoOnlineCarListPanelProvider = mMogoServiceApis.getOnlineCarPanelApi();
|
||||
|
||||
mMarkerManager = mMapService.getMarkerManager(context);
|
||||
mNavi = mMapService.getNavi(context);
|
||||
@@ -265,4 +268,7 @@ public class V2XServiceManager {
|
||||
}
|
||||
|
||||
|
||||
public static IMogoOnlineCarListPanelProvider getMogoOnlineCarListPanelProvider() {
|
||||
return mMogoOnlineCarListPanelProvider;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ import android.content.Intent;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.service.carinfo.CarStateInfo;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.scenario.IV2XScenarioManager;
|
||||
@@ -62,6 +60,12 @@ public class V2XScenarioManager implements IV2XScenarioManager {
|
||||
V2XUtils.runOnUiThread(() -> {
|
||||
// 提取之前存储的场景
|
||||
if (v2XMessageEntity != null) {
|
||||
try {
|
||||
// 与其它面板互斥
|
||||
V2XServiceManager.getMogoOnlineCarListPanelProvider().hidePanel();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// 广播给应用内部其它模块
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_ACTION);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_24"/>
|
||||
<gradient
|
||||
android:startColor="#5E6079"
|
||||
android:endColor="#3F4057"
|
||||
android:startColor="#B35E6079"
|
||||
android:endColor="#B33F4057"
|
||||
android:type="linear"
|
||||
android:angle="180"/>
|
||||
|
||||
|
||||
@@ -78,14 +78,9 @@ public class MogoADASController implements IMogoADASController {
|
||||
|
||||
@Override
|
||||
public void showADAS() {
|
||||
|
||||
// TODO: 2020/9/4 和引导模块交互
|
||||
if ( DebugConfig.isLoadGuideModule() ) {
|
||||
if ( !SharedPrefsMgr.getInstance( AbsMogoApplication.getApp() ).getBoolean( getSpGuide(), false ) ) {
|
||||
if ( !SharedPrefsMgr.getInstance( AbsMogoApplication.getApp() ).getBoolean( getSpGuide(), false ) ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
||||
init( AbsMogoApplication.getApp() );
|
||||
AutopilotServiceManage.getInstance().registerAutopilotServiceStatusListener( new IAutopilotServiceStatusListener() {
|
||||
|
||||