Merge remote-tracking branch 'origin/qa_1.1.8' into qa_1.1.8

This commit is contained in:
wangcongtao
2020-11-30 16:06:58 +08:00
34 changed files with 278 additions and 151 deletions

1
.idea/gradle.xml generated
View File

@@ -74,6 +74,7 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

View File

@@ -129,7 +129,7 @@ TTS_NOOP_VERSION=2.0.7
######## 外部依赖引用
# 车聊聊
CARCHATTING_VERSION=1.8.8
CARCHATTING_VERSION=1.8.9
# 车聊聊接口
CARCHATTINGPROVIDER_VERSION=1.1.7
# loglib

View File

@@ -17,14 +17,14 @@ public class NavigatorApps {
private static AppInfo app_ = new AppInfo( "高德地图", "com.autonavi.amapauto", "", 0, null, R.drawable.module_apps_ic_navigator_navi_disable, 1 );
// private static AppInfo app2 = new AppInfo( "音乐", "com.tencent.wecarflow", "", 0, null, R.drawable.module_apps_ic_navigator_media, 2 );
private static AppInfo app2 = new AppInfo( "音乐", "com.zhidao.music", "", 0, null, R.drawable.module_apps_ic_navigator_media_selector, 2 );
private static AppInfo app3 = new AppInfo( "车聊聊", "com.zhidao.imdemo", "", 0, null, R.drawable.module_apps_ic_navigator_im_selector, 6 );
// private static AppInfo app3 = new AppInfo( "车聊聊", "com.zhidao.imdemo", "", 0, null, R.drawable.module_apps_ic_navigator_im_selector, 6 );
private static AppInfo app4 = new AppInfo( "全部应用", "com.mogo.launcher.applist", "", 0, null, R.drawable.module_apps_ic_navigator_applist_selector, 4 );
public static List< AppInfo > getApps() {
List< AppInfo > sApps = new ArrayList<>();
sApps.add( app );
sApps.add( app2 );
sApps.add( app3 );
// sApps.add( app3 );
sApps.add( app4 );
return sApps;
}
@@ -33,7 +33,7 @@ public class NavigatorApps {
List< AppInfo > sApps = new ArrayList<>();
sApps.add( app );
sApps.add( app2 );
sApps.add( app3 );
// sApps.add( app3 );
sApps.add( app4 );
return sApps;
}

View File

@@ -26,6 +26,7 @@
<item>com.android.messaging</item>
<item>com.android.contacts</item>
<item>com.android.dialer</item>
<item>com.zhidao.imdemo</item>
</string-array>
<string-array name="module_apps_array_filter_packages">
<item>com.mogo.launcher</item>
@@ -44,5 +45,6 @@
<item>com.iflytek.inputmethod.pad</item>
<item>com.nwd.tools.reboot</item>
<item>com.android.car.setting</item>
<item>com.zhidao.imdemo</item>
</string-array>
</resources>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/selector_call_btn_pressed" android:state_pressed="true" />
<item android:drawable="@drawable/selector_call_btn_normal" android:state_pressed="false" />
<item android:drawable="@drawable/selector_call_btn_normal" />
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -120,9 +120,6 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
// 相当于每次onResume都会请求一下个人信息目的是能够相对及时的同步手机端的个人信息修改
requestUserInfo();
}
if(DebugConfig.isMapBased()) {
requestCarModelList();
}
getCommonConfig();
}
@@ -242,38 +239,4 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
return "";
}
}
private void requestCarModelList() {
Map<String, String> params = new HashMap<>(8);
params.put("sn", Utils.getSn());
// params.put("sn", "ZD802B1932L00617");
mNetWork.create(UserInfoNetApiServices.class, DztHttpConstant.getBaseUrl()).
requestCarModelList(params).
subscribeOn(Schedulers.io()).
observeOn(Schedulers.io()).
subscribe(new SubscribeImpl<CarModelListResponse>(RequestOptions.create(context)) {
@Override
public void onSuccess(CarModelListResponse o) {
super.onSuccess(o);
Logger.d(TAG, "请求车模列表成功: " + o);
// todo 保存到sp中
SharedPrefsMgr.getInstance(context).putString("CAR_MODEL_LIST",
GsonUtil.jsonFromObject(o.getResult()));
}
@Override
public void onError(Throwable e) {
super.onError(e);
Logger.e(TAG, e, "请求自车模型失败");
}
@Override
public void onError(String message, int code) {
super.onError(message, code);
Logger.e(TAG, "请求自车模型失败: " + message);
}
});
}
}

View File

@@ -23,7 +23,4 @@ public interface UserInfoNetApiServices {
*/
@GET("carlife/carMachine/getAccountInfo")
Single<UserInfoResponse> requestUserInfo(@QueryMap Map<String, String> params);
@GET("yycp-userDataService/app/enthusiasm/getEnthusiasmInfo/v1")
Observable<CarModelListResponse> requestCarModelList(@QueryMap Map<String, String> params);
}

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/service_car_panel_call_pressed" android:state_pressed="true" />
<item android:drawable="@drawable/service_car_panel_call_normal" android:state_pressed="false" />
<item android:drawable="@drawable/service_car_panel_call_normal" />
</selector>

View File

@@ -62,7 +62,7 @@
android:layout_width="@dimen/modle_car_panel_call"
android:layout_height="@dimen/modle_car_panel_call"
android:layout_marginEnd="@dimen/modle_car_panel_call_margin"
android:background="@drawable/selector_service_car_panel_call"
android:background="@drawable/module_common_selector_call"
android:padding="@dimen/module_services_panel_item_detail_padding"
android:textColor="@color/module_services_panel_item_detail_textColor"
android:textSize="@dimen/module_services_panel_item_detail_textSize"

View File

@@ -15,7 +15,6 @@ import com.mogo.map.navi.IMogoNaviListener;
import com.mogo.module.v2x.fragment.V2XEventPanelFragment;
import com.mogo.service.eventpanel.IEventPanelProvider;
import com.mogo.service.module.IMogoModuleLifecycle;
import com.mogo.service.module.IMogoModuleProvider;
import com.mogo.service.module.ModuleType;
import com.mogo.utils.logger.Logger;
@@ -35,6 +34,7 @@ public class V2XEventPanelModuleProvider implements
@Override
public Fragment createFragment(Context context, Bundle data) {
Logger.e(MODULE_NAME, "事件模版 createFragment。。。。");
V2XServiceManager.init(context);
return V2XEventPanelFragment.Companion.getInstance();
}
@@ -92,21 +92,28 @@ public class V2XEventPanelModuleProvider implements
@Override
public void init(Context context) {
V2XServiceManager.init(context);
Logger.e(MODULE_NAME, "事件模版 模块初始化。。。。");
}
@Override
public void showPanelWithSelectedItem(int item) {
V2XEventPanelFragment.Companion.getInstance().showPanelWithSelectedItem(item);
if (!V2XServiceManager.getMoGoStatusManager().isMainPageIsBackground()) {
V2XEventPanelFragment.Companion.getInstance().showPanelWithSelectedItem(item);
}
}
@Override
public void showPanel() {
V2XEventPanelFragment.Companion.getInstance().showPanel();
if (!V2XServiceManager.getMoGoStatusManager().isMainPageIsBackground()) {
V2XEventPanelFragment.Companion.getInstance().showPanel();
}
}
@Override
public void hidePanel() {
V2XEventPanelFragment.Companion.getInstance().hidePanel();
if (!V2XServiceManager.getMoGoStatusManager().isMainPageIsBackground()) {
V2XEventPanelFragment.Companion.getInstance().hidePanel();
}
}
}

View File

@@ -63,7 +63,7 @@ public class V2XScenarioHistoryRoadEventVH extends V2XBaseViewHolder<V2XHistoryS
mTagEventType.setText(EventTypeUtils.getPoiTypeStr(mExploreWay.getPoiType()));
try {
mTvIllegalNum.setText(mExploreWay.getUserInfo().getUserName() + "的分享 " +
mTvIllegalNum.setText(mExploreWay.getUserInfo().getUserName() + "的分享 " +
TimeUtils.millis2String(mOldScenarioData.getTriggerTime(), "MM月dd日 HH:mm"));
} catch (Exception e) {
e.printStackTrace();

View File

@@ -1,11 +1,11 @@
package com.mogo.module.v2x.listener;
import com.mogo.module.v2x.V2XConst;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes.V2XMarkerEntity;
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.module.common.entity.V2XPoiTypeEnum;
import com.mogo.module.v2x.V2XConst;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes;
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes.V2XMarkerEntity;
import com.mogo.module.v2x.scenario.impl.V2XScenarioManager;
import com.mogo.module.v2x.utils.MarkerUtils;
import com.mogo.module.v2x.utils.V2XUtils;
@@ -64,24 +64,14 @@ public class V2XMessageListener_401005 implements IMogoOnMessageListener<V2XSpec
V2XServiceManager.getMarkerManager().removeMarkers(V2XConst.V2X_MARKER_SPECIAL_CAR);
List<V2XMarkerEntity> coordinates = message.getCoordinates();
List<V2XMarkerEntity> entityList = new ArrayList<>();
// 移除上一次的数据
//Context context = V2XServiceManager.getContext();
for (V2XMarkerEntity coordinate : coordinates) {
//故障车机
if (coordinate.getTargetId() == V2XPoiTypeEnum.ALERT_CAR_TROUBLE_WARNING) {
//V2XMarkerEntity.UserInfoBean userInfoBean = coordinate.getUserInfo();
//if (userInfoBean != null) {
entityList.add(coordinate);
//}
//绘制
//V2XServiceManager
// .getMoGoV2XMarkerManager()
// .drawableSpecialCarPOI(context, coordinate, V2XMarkerClickListener.getInstance());
}
}
if (!entityList.isEmpty()) {
//V2XUtils.runOnUiThread(() -> V2XServiceManager.getMoGoV2XScenarioManager().showOtherSeekHelpWindow(entityList));
V2XUtils.runOnUiThread(() -> {
V2XMessageEntity<List<V2XMarkerEntity>> v2XMessageEntity = new V2XMessageEntity<>();
v2XMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_SEEK_WARNING);

View File

@@ -56,66 +56,70 @@ public class V2XScenarioManager implements IV2XScenarioManager {
@Override
public void handlerMessage(V2XMessageEntity v2XMessageEntity) {
//Logger.d(MODULE_NAME, "处理V2X场景" + GsonUtil.jsonFromObject(v2XMessageEntity));
synchronized (V2XScenarioManager.class) {
// 展示
V2XUtils.runOnUiThread(() -> {
// 提取之前存储的场景
if (v2XMessageEntity != null) {
try {
synchronized (V2XScenarioManager.class) {
// 展示
V2XUtils.runOnUiThread(() -> {
// 提取之前存储的场景
if (v2XMessageEntity != null) {
// 广播给应用内部其它模块
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_ACTION);
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
LocalBroadcastManager.getInstance(V2XUtils.getApp()).sendBroadcast(intent);
// 广播给应用内部其它模块
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_ACTION);
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
LocalBroadcastManager.getInstance(V2XUtils.getApp()).sendBroadcast(intent);
mV2XScenario = mV2XScenarioSet.get(v2XMessageEntity.getType());
// 如果没有拿到之前的,根据类型分发
if (mV2XScenario == null) {
switch (v2XMessageEntity.getType()) {
case V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING:
mV2XScenario = V2XRoadEventScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_SEEK_WARNING:
mV2XScenario = V2XSeekHelpScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_FATIGUE_DRIVING:
mV2XScenario = V2XFatigueDrivingScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_WINDOW_WARNING:
mV2XScenario = V2XPushEventScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_LIVE_CAR_WARNING:
mV2XScenario = V2XPushLiveCarScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_ANIMATION_WARNING:
mV2XScenario = V2XAnimationScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP:
mV2XScenario = V2XCarForHelpScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_ILLEGAL_PARK_WARNING:
mV2XScenario = V2XIllegalParkScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_EVENT_UGC_WARNING:
mV2XScenario = V2XEventUgcScenario.getInstance();
break;
default:
Logger.e(MODULE_NAME, "当前V2X消息类型未定义。");
TipToast.tip("当前V2X消息类型未定义");
return;
mV2XScenario = mV2XScenarioSet.get(v2XMessageEntity.getType());
// 如果没有拿到之前的,根据类型分发
if (mV2XScenario == null) {
switch (v2XMessageEntity.getType()) {
case V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING:
mV2XScenario = V2XRoadEventScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_SEEK_WARNING:
mV2XScenario = V2XSeekHelpScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_FATIGUE_DRIVING:
mV2XScenario = V2XFatigueDrivingScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_WINDOW_WARNING:
mV2XScenario = V2XPushEventScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_LIVE_CAR_WARNING:
mV2XScenario = V2XPushLiveCarScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_ANIMATION_WARNING:
mV2XScenario = V2XAnimationScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP:
mV2XScenario = V2XCarForHelpScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_ILLEGAL_PARK_WARNING:
mV2XScenario = V2XIllegalParkScenario.getInstance();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_EVENT_UGC_WARNING:
mV2XScenario = V2XEventUgcScenario.getInstance();
break;
default:
Logger.e(MODULE_NAME, "当前V2X消息类型未定义。");
TipToast.tip("当前V2X消息类型未定义");
return;
}
}
// 展示最新的消息
if (mV2XScenario != null) {
if (v2XMessageEntity.getType() != V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP) {
hidOtherPanel();
}
mV2XScenario.init(v2XMessageEntity);
mV2XScenarioSet.put(v2XMessageEntity.getType(), mV2XScenario);
}
}
// 展示最新的消息
if (mV2XScenario != null) {
if (v2XMessageEntity.getType() != V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP) {
hidOtherPanel();
}
mV2XScenario.init(v2XMessageEntity);
mV2XScenarioSet.put(v2XMessageEntity.getType(), mV2XScenario);
}
}
});
});
}
} catch (Exception e) {
e.printStackTrace();
}
}

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/dp_24"/>
<corners android:radius="@dimen/dp_30"/>
<gradient
android:startColor="#B35E6079"
android:endColor="#B33F4057"

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/v2x_call_select" android:state_pressed="true" />
<item android:drawable="@drawable/v2x_call_normal" android:state_pressed="false" />
<item android:drawable="@drawable/v2x_call_normal" />
</selector>

View File

@@ -49,7 +49,7 @@
android:id="@+id/tagEventType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_36"
android:layout_marginStart="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginBottom="@dimen/dp_36"
android:background="@drawable/bg_v2x_event_type_read"
@@ -87,7 +87,7 @@
android:id="@+id/llIllegalParkingLike"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_40"
android:layout_marginRight="@dimen/dp_40"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/llIllegalParkingUnLike"
app:layout_constraintTop_toTopOf="parent"
@@ -97,7 +97,7 @@
android:id="@+id/llIllegalParkingUnLike"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="26px"
android:layout_marginRight="@dimen/dp_40"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -14,18 +14,17 @@
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_21"
android:layout_marginEnd="@dimen/dp_31"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:miv_borderColor="#4cffffff"
app:miv_borderColor="#3381A4DC"
app:miv_failureHolder="@drawable/icon_default_user_head"
app:miv_overlayImageId="@drawable/icon_default_user_head"
app:miv_placeHolder="@drawable/icon_default_user_head"
app:miv_shape="circle"
app:miv_shapeBorderWidth="@dimen/dp_4" />
app:miv_shapeBorderWidth="@dimen/dp_5" />
<TextView
android:id="@+id/tvFaultHelpName"
@@ -112,7 +111,7 @@
android:layout_width="@dimen/module_v2x_event_button_size"
android:layout_height="@dimen/module_v2x_event_button_size"
android:layout_marginEnd="@dimen/dp_40"
android:src="@drawable/selector_call_btn"
android:src="@drawable/module_common_selector_call"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/ivFaultHelpEventNavi"

View File

@@ -25,7 +25,7 @@
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
android:gravity="center_vertical"
android:text="周围5公里共15条交通信息"
android:textColor="@color/v2x_white"
android:textColor="@color/v2x_FFF_666"
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
<!-- android:layout_centerInParent="true"-->

View File

@@ -0,0 +1,34 @@
package com.mogo.service.impl.adas;
import com.mogo.commons.debug.DebugConfig;
import java.util.Map;
import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.QueryMap;
interface CarModelInfoNetApiServices {
String HOST_DEV = "http://dzt-test.zhidaozhixing.com";
String HOST_TEST = "http://dzt-test.zhidaozhixing.com";
String HOST_DEMO = "http://dzt-show.zhidaozhixing.com";
String HOST_PRODUCT = "http://dzt.zhidaozhixing.com";
static String getBaseUrl(){
switch ( DebugConfig.getNetMode() ) {
case DebugConfig.NET_MODE_DEV:
return HOST_DEV;
case DebugConfig.NET_MODE_QA:
return HOST_TEST;
case DebugConfig.NET_MODE_DEMO:
return HOST_DEMO;
default:
return HOST_PRODUCT;
}
}
@GET("yycp-userDataService/app/enthusiasm/getEnthusiasmInfo/v1")
Observable<CarModelListResponse> requestCarModelList(@QueryMap Map<String, String> params);
}

View File

@@ -0,0 +1,47 @@
package com.mogo.service.impl.adas;
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 +
'}';
}
}

View File

@@ -0,0 +1,29 @@
package com.mogo.service.impl.adas;
import com.mogo.commons.data.BaseData;
/**
* 请求根据热心指数获取自车图标列表的响应类
*
* @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 + '\'' +
'}';
}
}

View File

@@ -8,6 +8,8 @@ import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.context.ContextHolderUtil;
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.MogoModule;
@@ -22,6 +24,8 @@ import com.mogo.service.statusmanager.IMogoStatusManager;
import com.mogo.utils.TipToast;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.network.RequestOptions;
import com.mogo.utils.network.utils.GsonUtil;
import com.mogo.utils.storage.SharedPrefsMgr;
import com.zhidao.adasconfig.api.AdasConfigApiController;
import com.zhidao.adasconfig.common.config.EnumCarChatIncognitoMode;
@@ -34,7 +38,11 @@ import com.zhidao.autopilot.support.api.IAutopolitDataCallBack;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.reactivex.schedulers.Schedulers;
import static com.mogo.module.common.utils.SPConst.getSpGuide;
@@ -132,10 +140,17 @@ public class MogoADASController implements IMogoADASController {
@Override
public void requestGetCarModelListInfo() {
Logger.d( TAG, "requestGetCarModelListInfo" );
// 向adas发送车模list
AutopilotServiceManage.getInstance().settingCarModelListInfo( SharedPrefsMgr.getInstance( context ).getString(
"CAR_MODEL_LIST", "default-value" ) );
if (DebugConfig.isMapBased()) {
Logger.d(TAG, "requestGetCarModelListInfo");
// 向adas发送车模list
String carModelList = SharedPrefsMgr.getInstance(context).getString(
"CAR_MODEL_LIST", "");
if (carModelList != null && !carModelList.isEmpty()) {
AutopilotServiceManage.getInstance().settingCarModelListInfo(carModelList);
}
// 此处进行网络请求请求成功后再通知一次adas
requestCarModelList();
}
}
@Override
@@ -144,6 +159,8 @@ public class MogoADASController implements IMogoADASController {
MyLocationUtil.emphasizeMyLocation();
}
needEmphasizeMyLocation = false;
useTestSn = !useTestSn;
}
@Override
@@ -155,6 +172,8 @@ public class MogoADASController implements IMogoADASController {
}
}
private boolean useTestSn = false;
private void invokeShowADASOperation() {
int delay = CarSeries.isF8xxSeries() ? 0 : 100;
@@ -303,6 +322,47 @@ public class MogoADASController implements IMogoADASController {
adasDataCallbackList.remove(callback);
}
private static final String TEST_SN = "ZD802B1932L00617";
private String currentSn = TEST_SN;
private void requestCarModelList() {
Map<String, String> params = new HashMap<>(8);
params.put("sn", Utils.getSn());
// currentSn = useTestSn ? TEST_SN : Utils.getSn();
// params.put("sn", currentSn);
MogoApisHandler.getInstance().getApis().getNetworkApi().create(CarModelInfoNetApiServices.class, CarModelInfoNetApiServices.getBaseUrl()).
requestCarModelList(params).
subscribeOn(Schedulers.io()).
observeOn(Schedulers.io()).
subscribe(new SubscribeImpl<CarModelListResponse>(RequestOptions.create(context)) {
@Override
public void onSuccess(CarModelListResponse o) {
super.onSuccess(o);
Logger.d(TAG, "请求车模列表成功: " + o);
// 保存到sp中
String value = GsonUtil.jsonFromObject(o.getResult());
SharedPrefsMgr.getInstance(context).putString("CAR_MODEL_LIST",
value);
if(value != null && !value.isEmpty()){
AutopilotServiceManage.getInstance().settingCarModelListInfo(value);
}
}
@Override
public void onError(Throwable e) {
super.onError(e);
Logger.e(TAG, e, "请求自车模型失败");
}
@Override
public void onError(String message, int code) {
super.onError(message, code);
Logger.e(TAG, "请求自车模型失败: " + message);
}
});
}
@Override
public void release() {
AutopilotServiceManage.getInstance().release();

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/selector_call_btn_pressed_light" android:state_pressed="true" />
<item android:drawable="@drawable/selector_call_btn_light" android:state_pressed="false" />
<item android:drawable="@drawable/selector_call_btn_light" />
</selector>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/service_car_panel_call_pressed_light" android:state_pressed="true" />
<item android:drawable="@drawable/service_car_panel_call_normal_light" android:state_pressed="false" />
<item android:drawable="@drawable/service_car_panel_call_normal_light" />
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/dp_21"/>
<corners android:radius="@dimen/dp_30"/>
<gradient
android:startColor="#579EFF"

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB