opt package dep
This commit is contained in:
@@ -267,7 +267,7 @@ public class DebugConfig {
|
||||
return sLoadGuideModule;
|
||||
}
|
||||
|
||||
private static String SP_GUIDE = "SP_GUIDE_2020_09_09";
|
||||
public static String SP_GUIDE = "SP_GUIDE_2020_09_09";
|
||||
|
||||
public static String getSpGuide() {
|
||||
return SP_GUIDE;
|
||||
|
||||
@@ -16,9 +16,11 @@ import androidx.annotation.Nullable;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.SimpleTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.mogo.commons.context.ContextHolderUtil;
|
||||
import com.mogo.map.uicontroller.CarCursorOption;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.R;
|
||||
import com.mogo.service.datamanager.IMogoDataChangedListener;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.ViewUtils;
|
||||
import com.mogo.utils.glide.GlideApp;
|
||||
@@ -34,6 +36,17 @@ public class MyLocationUtil {
|
||||
private static boolean isLoadingIcon = false;
|
||||
private static boolean needEmphasizeMyLocation = false;
|
||||
|
||||
static {
|
||||
MogoApisHandler.getInstance().getApis().getDataManagerApi()
|
||||
.registerDataListener( "ADAS", data ->{
|
||||
if ( data == null ) {
|
||||
emphasizeMyLocation();
|
||||
} else if( data instanceof String ){
|
||||
setMyLocationIconUrl( ContextHolderUtil.getContext(), ( ( String ) data ));
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
public static void emphasizeMyLocation(){
|
||||
if (!isLoadingIcon) {
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().emphasizeMyLocation();
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.mogo.module.common.utils;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
|
||||
/**
|
||||
* 多模块之间SP状态公共类
|
||||
*/
|
||||
public class SPConst {
|
||||
|
||||
private static String SP_GUIDE = "SP_GUIDE_2020_09_09";
|
||||
private static String SP_GUIDE = DebugConfig.SP_GUIDE;
|
||||
|
||||
//用于多模块之间引导状态判断
|
||||
public static String getSpGuide() {
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.mogo.module.extensions.userinfo;
|
||||
|
||||
import com.mogo.module.common.entity.OwnCarModelEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CarModelListInfo {
|
||||
private String sn;
|
||||
/**
|
||||
* 热心指数 eg: 1 1.5 2 2.5
|
||||
*/
|
||||
private float enthusiasmIndex;
|
||||
private List<OwnCarModelEntity> imageData;
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public float getEnthusiasmIndex() {
|
||||
return enthusiasmIndex;
|
||||
}
|
||||
|
||||
public void setEnthusiasmIndex(float enthusiasmIndex) {
|
||||
this.enthusiasmIndex = enthusiasmIndex;
|
||||
}
|
||||
|
||||
public List<OwnCarModelEntity> getImageData() {
|
||||
return imageData;
|
||||
}
|
||||
|
||||
public void setImageData(List<OwnCarModelEntity> imageData) {
|
||||
this.imageData = imageData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CarModelListInfo{" +
|
||||
"sn='" + sn + '\'' +
|
||||
", enthusiasmIndex=" + enthusiasmIndex +
|
||||
", imageData=" + imageData +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.mogo.module.extensions.userinfo;
|
||||
|
||||
import com.mogo.commons.data.BaseData;
|
||||
import com.mogo.module.common.entity.OwnCarModelEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 请求根据热心指数获取自车图标列表的响应类
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class CarModelListResponse extends BaseData {
|
||||
private CarModelListInfo result;
|
||||
|
||||
public CarModelListInfo getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(CarModelListInfo result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CarModelListResponse{" +
|
||||
"result=" + result +
|
||||
", code=" + code +
|
||||
", msg='" + msg + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -45,9 +45,11 @@ dependencies {
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
api rootProject.ext.dependencies.mogomapapi
|
||||
api rootProject.ext.dependencies.skinsupport
|
||||
api rootProject.ext.dependencies.mogocommons
|
||||
} else {
|
||||
api project(":libraries:mogo-map-api")
|
||||
api project(":skin:mogo-skin-support")
|
||||
api project(":foudations:mogo-commons")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
package com.mogo.service.impl.adas;
|
||||
|
||||
import com.mogo.module.common.entity.OwnCarModelEntity;
|
||||
package com.mogo.service.adas.entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.service.impl.adas;
|
||||
package com.mogo.service.adas.entity;
|
||||
|
||||
import com.mogo.commons.data.BaseData;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.module.common.entity;
|
||||
package com.mogo.service.adas.entity;
|
||||
|
||||
/**
|
||||
* 自车模型实体,用于从服务端获取不同等级的自车模型信息以及将此信息传递给adas
|
||||
@@ -49,15 +49,12 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.mogoserviceapi
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
} else {
|
||||
api project(":libraries:mogo-map")
|
||||
implementation project(":libraries:mogo-map-api")
|
||||
implementation project(":foudations:mogo-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(":services:mogo-service-api")
|
||||
implementation project(":modules:mogo-module-common")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.service.impl.adas;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.service.adas.entity.CarModelListResponse;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -28,7 +29,7 @@ interface CarModelInfoNetApiServices {
|
||||
}
|
||||
|
||||
@GET("yycp-userDataService/app/enthusiasm/getEnthusiasmInfo/v1")
|
||||
Observable<CarModelListResponse> requestCarModelList(@QueryMap Map<String, String> params);
|
||||
Observable< CarModelListResponse > requestCarModelList( @QueryMap Map<String, String> params);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -13,9 +13,6 @@ import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
import com.mogo.commons.network.Utils;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.map.MyLocationUtil;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.mogo.service.adas.IMogoAdasCarDataCallback;
|
||||
@@ -28,7 +25,10 @@ import com.mogo.service.adas.entity.ADASCarStateInfo;
|
||||
import com.mogo.service.adas.entity.ADASRecognizedResult;
|
||||
import com.mogo.service.adas.entity.ADASWarnMessage;
|
||||
import com.mogo.service.adas.entity.AdasOCHData;
|
||||
import com.mogo.service.adas.entity.CarModelListResponse;
|
||||
import com.mogo.service.datamanager.IMogoDataManager;
|
||||
import com.mogo.service.impl.singleton.SingletonsHolder;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.utils.TipToast;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
@@ -64,8 +64,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
import static com.mogo.module.common.utils.SPConst.getSpGuide;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-03-10
|
||||
@@ -196,11 +194,11 @@ public class MogoADASController implements IMogoADASController {
|
||||
public void showADAS() {
|
||||
|
||||
if ( DebugConfig.isNeedLoadGuideModule() ) {
|
||||
if ( !SharedPrefsMgr.getInstance( AbsMogoApplication.getApp() ).getBoolean( getSpGuide(), false ) ) {
|
||||
if ( !SharedPrefsMgr.getInstance( AbsMogoApplication.getApp() ).getBoolean( DebugConfig.getSpGuide(), false ) ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
if ( SingletonsHolder.get( IMogoStatusManager.class ).isVrMode() ) {
|
||||
return;
|
||||
}
|
||||
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
|
||||
@@ -252,7 +250,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
needEmphasizeMyLocation = true;
|
||||
// 修改自车图标展示
|
||||
SharedPrefsMgr.getInstance( context ).putString( "MY_LOCATION_CONFIG", carStyleUrl );
|
||||
MyLocationUtil.setMyLocationIconUrl( context, carStyleUrl );
|
||||
SingletonsHolder.get( IMogoDataManager.class ).syncData( "ADAS", carStyleUrl );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -273,7 +271,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
@Override
|
||||
public void clickSettingBack() {
|
||||
if ( needEmphasizeMyLocation ) {
|
||||
MyLocationUtil.emphasizeMyLocation();
|
||||
SingletonsHolder.get( IMogoDataManager.class ).syncData( "ADAS", null );
|
||||
}
|
||||
needEmphasizeMyLocation = false;
|
||||
|
||||
@@ -348,10 +346,10 @@ public class MogoADASController implements IMogoADASController {
|
||||
|
||||
}
|
||||
// 仅在 vr 模式下显示 adas 识别车辆
|
||||
if ( !MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
if ( !SingletonsHolder.get( IMogoStatusManager.class ).isVrMode() ) {
|
||||
return;
|
||||
}
|
||||
if ( !MogoApisHandler.getInstance().getApis().getStatusManagerApi().isMainPageLaunched() ) {
|
||||
if ( !SingletonsHolder.get( IMogoStatusManager.class ).isMainPageLaunched() ) {
|
||||
return;
|
||||
}
|
||||
handleAdasRecognizedData( ownerCarStateRectList );
|
||||
@@ -375,7 +373,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
private boolean useTestSn = false;
|
||||
|
||||
private void invokeShowADASOperation() {
|
||||
int delay = CarSeries.isF8xxSeries() ? 0 : 100;
|
||||
int delay = 0;
|
||||
|
||||
UiThreadHandler.postDelayed( () -> {
|
||||
|
||||
@@ -386,7 +384,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
|
||||
if ( SingletonsHolder.get( IMogoStatusManager.class ).isVrMode() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -541,7 +539,8 @@ public class MogoADASController implements IMogoADASController {
|
||||
params.put( "sn", Utils.getSn() );
|
||||
// currentSn = useTestSn ? TEST_SN : Utils.getSn();
|
||||
// params.put("sn", currentSn);
|
||||
MogoApisHandler.getInstance().getApis().getNetworkApi().create( CarModelInfoNetApiServices.class, CarModelInfoNetApiServices.getBaseUrl() ).
|
||||
|
||||
SingletonsHolder.get( IMogoNetwork.class ).create( CarModelInfoNetApiServices.class, CarModelInfoNetApiServices.getBaseUrl() ).
|
||||
requestCarModelList( params ).
|
||||
subscribeOn( Schedulers.io() ).
|
||||
observeOn( Schedulers.io() ).
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.service.impl.singleton;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.service.datamanager.IMogoDataManager;
|
||||
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
import com.mogo.service.impl.fragmentmanager.MogoFragmentManager;
|
||||
import com.mogo.service.impl.map.MogoMapService;
|
||||
@@ -35,6 +36,7 @@ public class SingletonsHolder {
|
||||
sSingletons.put( IMogoNetwork.class, new MogoNetWorkService() );
|
||||
sSingletons.put( IMogoMsgCenter.class, new MogoMsgCenter() );
|
||||
sSingletons.put( IMogoStatusManager.class, new MogoStatusManager() );
|
||||
sSingletons.put( IMogoDataManager.class, ARouter.getInstance().navigation( IMogoDataManager.class ) );
|
||||
sSingletons.put( IMogoRefreshStrategyController.class, ARouter.getInstance().navigation( IMogoRefreshStrategyController.class ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user