Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
tongchenfei
2020-11-20 11:59:49 +08:00
12 changed files with 133 additions and 82 deletions

View File

@@ -134,41 +134,46 @@ public class V2XOtherSeekHelpVH extends V2XBaseViewHolder<V2XEventShowEntity> {
} catch (Exception e) {
e.printStackTrace();
}
ivHead.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
triggerIVReportHead(mNoveltyInfo);
}
});
// 只有自研车机才会 有车聊聊通话
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
// 判断是否可以打电话
ChartingUtil.isCanCall(b -> {
if (b) {
// 判断是否可以打电话
ChartingUtil.isOnLine(mV2XPushMessageEntity.getSn(), b1 -> {
if (b1) {
ivCall.setVisibility(VISIBLE);
} else {
ivCall.setVisibility(GONE);
}
});
} else {
ivCall.setVisibility(GONE);
// M1低配车机限制
// 不展示打电话按钮
// 不能查看用户详情
if (DebugConfig.isMapBased()) {
ivHead.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
triggerIVReportHead(mNoveltyInfo);
}
});
ivCall.setOnClickListener(v -> {
V2XServiceManager.getV2XRefreshModel().respondingToHelp(mUserInfo.getSn());
if (!V2XUtils.isFastClick()) {
try {
triggerCallChart(mNoveltyInfo);
} catch (Exception e) {
e.printStackTrace();
// 只有自研车机才会 有车聊聊通话
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
// 判断是否可以打电话
ChartingUtil.isCanCall(b -> {
if (b) {
// 判断是否可以打电话
ChartingUtil.isOnLine(mV2XPushMessageEntity.getSn(), b1 -> {
if (b1) {
ivCall.setVisibility(VISIBLE);
} else {
ivCall.setVisibility(GONE);
}
});
} else {
ivCall.setVisibility(GONE);
}
}
});
});
ivCall.setOnClickListener(v -> {
V2XServiceManager.getV2XRefreshModel().respondingToHelp(mUserInfo.getSn());
if (!V2XUtils.isFastClick()) {
try {
triggerCallChart(mNoveltyInfo);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
}
try {
if (!TextUtils.isEmpty(mV2XPushMessageEntity.getHeadImgUrl())) {

View File

@@ -376,23 +376,28 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
// 重新设置用户信息
mNoveltyInfo.setUserInfo(mUserInfo);
// 只有自研车机才会 有车聊聊通话
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
// 判断是否可以打电话
ChartingUtil.isCanCall(b -> {
if (b) {
// 判断是否可以打电话
ChartingUtil.isOnLine(mUserInfo.getSn(), b1 -> {
if (b1) {
ivEventCallChart.setVisibility(VISIBLE);
} else {
ivEventCallChart.setVisibility(GONE);
}
});
} else {
ivEventCallChart.setVisibility(GONE);
}
});
// M1低配车机限制
// 不展示打电话按钮
// 不能查看用户详情
if (DebugConfig.isMapBased()) {
// 只有自研车机才会 有车聊聊通话
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
// 判断是否可以打电话
ChartingUtil.isCanCall(b -> {
if (b) {
// 判断是否可以打电话
ChartingUtil.isOnLine(mUserInfo.getSn(), b1 -> {
if (b1) {
ivEventCallChart.setVisibility(VISIBLE);
} else {
ivEventCallChart.setVisibility(GONE);
}
});
} else {
ivEventCallChart.setVisibility(GONE);
}
});
}
}
}
}

View File

@@ -122,34 +122,39 @@ public class V2XScenarioHistoryOtherSeekHelpVH extends V2XBaseViewHolder<V2XHist
triggerStartNavi(mNoveltyInfo);
});
// 只有自研车机才会 有车聊聊通话
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
// 判断是否可以打电话
ChartingUtil.isCanCall(b -> {
if (b) {
// 判断是否可以打电话
ChartingUtil.isOnLine(xPushMessageEntity.getSn(), b1 -> {
if (b1) {
mIvFaultHelpEventCall.setVisibility(VISIBLE);
} else {
mIvFaultHelpEventCall.setVisibility(GONE);
}
});
} else {
mIvFaultHelpEventCall.setVisibility(GONE);
}
});
mIvFaultHelpEventCall.setOnClickListener(v -> {
if (!V2XUtils.isFastClick()) {
V2XServiceManager.getV2XRefreshModel().respondingToHelp(mUserInfo.getSn());
try {
triggerCallChart(mNoveltyInfo);
} catch (Exception e) {
e.printStackTrace();
// M1低配车机限制
// 不展示打电话按钮
// 不能查看用户详情
if (DebugConfig.isMapBased()) {
// 只有自研车机才会 有车聊聊通话
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) {
// 判断是否可以打电话
ChartingUtil.isCanCall(b -> {
if (b) {
// 判断是否可以打电话
ChartingUtil.isOnLine(xPushMessageEntity.getSn(), b1 -> {
if (b1) {
mIvFaultHelpEventCall.setVisibility(VISIBLE);
} else {
mIvFaultHelpEventCall.setVisibility(GONE);
}
});
} else {
mIvFaultHelpEventCall.setVisibility(GONE);
}
}
});
});
mIvFaultHelpEventCall.setOnClickListener(v -> {
if (!V2XUtils.isFastClick()) {
V2XServiceManager.getV2XRefreshModel().respondingToHelp(mUserInfo.getSn());
try {
triggerCallChart(mNoveltyInfo);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
}
} catch (Exception e) {
e.printStackTrace();

View File

@@ -2,6 +2,7 @@ package com.mogo.module.v2x.alarm;
import android.text.TextUtils;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.map.MogoLatLng;
import com.mogo.map.location.MogoLocation;
import com.mogo.map.search.geo.IMogoGeoSearchListener;
@@ -69,8 +70,12 @@ public class V2XAlarmServer {
CopyOnWriteArrayList<V2XRoadEventEntity> v2XRoadEventEntityList,
MogoLocation currentLocation) {
try {
// 检测道路事件是否需UGC问答
V2XEarlyWarningServer.roadEventUgcCheck(currentLocation);
// M1低配车机限制
// 不展示UGC问答
if (DebugConfig.isMapBased()) {
// 检测道路事件是否需UGC问答
V2XEarlyWarningServer.roadEventUgcCheck(currentLocation);
}
// Logger.w(MODULE_NAME, "V2X预警--车辆状态:" + currentLocation);
// Logger.w(MODULE_NAME, "V2X预警--车辆速度:" + currentLocation.getSpeed());
// Logger.w(MODULE_NAME, "V2X预警--v2XRoadEventEntityList" + GsonUtil.jsonFromObject(v2XRoadEventEntityList));

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="6px" />
<gradient
android:angle="0"
android:endColor="#37DED9"
android:startColor="#1DAAA5" />
</shape>

View File

@@ -21,13 +21,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
<TextView
android:id="@+id/tagEventType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="@dimen/v2x_driving_width"
android:layout_height="@dimen/v2x_driving_heigt"
android:layout_marginStart="@dimen/dp_30"
android:gravity="center"
android:background="@drawable/bg_fatigue_driving"
android:textColor="@color/v2x_item_white"
android:textSize="@dimen/v2x_recommond_route_size"
android:layout_marginTop="@dimen/dp_20"
android:src="@drawable/icon_parting_icon"
android:text="@string/recommended_route"
app:layout_constraintBottom_toTopOf="@+id/tvAddress"
app:layout_constraintStart_toEndOf="@+id/ivIconP"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -108,5 +108,8 @@
<dimen name="v2x_right_context_margin">460px</dimen>
<dimen name="v2x_video_window_height_content">370px</dimen>
<dimen name="v2x_video_window_height">380px</dimen>
<dimen name="v2x_driving_width">84px</dimen>
<dimen name="v2x_driving_heigt">26px</dimen>
<dimen name="v2x_recommond_route_size">14px</dimen>
</resources>

View File

@@ -45,7 +45,7 @@
<dimen name="module_v2x_panel_surrounding_marginbottom">2px</dimen>
<dimen name="module_v2x_panel_surrounding_stance">30px</dimen>
<dimen name="module_v2x_surrounding_top">22px</dimen>
<string name="v2x_recommond_route_size">14px</string>
<dimen name="module_v2x_surrounding_list_margin_left">12px</dimen>
<dimen name="module_v2x_surrounding_item_margin_left">16px</dimen>
@@ -109,5 +109,8 @@
<dimen name="v2x_right_context_margin">460px</dimen>
<dimen name="v2x_video_window_height_content">370px</dimen>
<dimen name="v2x_video_window_height">380px</dimen>
<dimen name="v2x_driving_width">84px</dimen>
<dimen name="v2x_driving_heigt">26px</dimen>
<dimen name="v2x_recommond_route_size">14px</dimen>
</resources>

View File

@@ -84,4 +84,7 @@
<dimen name="module_v2x_event_panel_btn_x">940px</dimen>
<dimen name="module_v2x_event_panel_btn_y">701px</dimen>
<dimen name="v2x_driving_width">150px</dimen>
<dimen name="v2x_driving_heigt">46px</dimen>
<dimen name="v2x_recommond_route_size">26px</dimen>
</resources>

View File

@@ -106,6 +106,9 @@
<dimen name="v2x_right_context_margin">830px</dimen>
<dimen name="v2x_video_window_height_content">664px</dimen>
<dimen name="v2x_video_window_height">674px</dimen>
<dimen name="v2x_driving_width">150px</dimen>
<dimen name="v2x_driving_heigt">46px</dimen>
<dimen name="v2x_recommond_route_size">26px</dimen>
</resources>

View File

@@ -95,4 +95,7 @@
<dimen name="module_v2x_event_panel_btn_x">574px</dimen>
<dimen name="module_v2x_event_panel_in_launcher_btn_x">480px</dimen>
<dimen name="module_v2x_event_panel_btn_y">384px</dimen>
<dimen name="v2x_driving_width">150px</dimen>
<dimen name="v2x_driving_heigt">46px</dimen>
<dimen name="v2x_recommond_route_size">26px</dimen>
</resources>

View File

@@ -9,5 +9,7 @@
<string name="v2x_surrounding_detail_top_brief">周围5公里共 %d 条</string>
<string name="v2x_surrounding_go_to_share">去分享</string>
<string name="v2x_surrounding_refresh">刷新</string>
<string name="recommended_route">停车场推荐</string>
<string name="v2x_recommond_route_size">26px</string>
</resources>