Merge remote-tracking branch 'origin/dev_robotaxi-d-app-module_280_220608_2.8.0' into dev_robotaxi-d-app-module_280_220608_2.8.0
This commit is contained in:
@@ -149,6 +149,7 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
if (TaxiPassengerOrderStatusEnum.Cancel.getCode() == order.orderStatus){
|
||||
runOnUIThread(() -> {
|
||||
mView.showOrHideServingOrderFragment(false);
|
||||
mView.showOrHideStartAutopilotBtn(false);
|
||||
mView.showOrHidePressengerCheckPager(false, "",
|
||||
"", "", "", "");
|
||||
mView.showOrHideArrivedEndLayout(false,"","");
|
||||
@@ -165,13 +166,28 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
});
|
||||
return;
|
||||
}
|
||||
// TODO: 2022/6/10 若乘客端确认已经上车,则显示开始行程按钮 并且不可点击 暗
|
||||
// TODO: 2022/6/10 若司机端已经确认,则显示开始行程按钮 并且可点击
|
||||
//TODO: 2022/6/10 若订单取消或者隐藏则隐藏开始行程按钮
|
||||
if (TaxiPassengerOrderStatusEnum.UserArriveAtStart.getCode() == order.orderStatus){
|
||||
mView.showOrHideStartAutopilotBtn(true);
|
||||
}
|
||||
if (TaxiPassengerOrderStatusEnum.OnTheWayToEnd.getCode() == order.orderStatus){
|
||||
mView.showOrHideStartAutopilotBtn(false);
|
||||
}
|
||||
// 30 用户到达上车点 并通过了手机号后四位验证
|
||||
// 40 服务中
|
||||
if (TaxiPassengerOrderStatusEnum.UserArriveAtStart.getCode() == order.orderStatus
|
||||
|| TaxiPassengerOrderStatusEnum.OnTheWayToEnd.getCode() == order.orderStatus){
|
||||
runOnUIThread(() -> mView.showOrHideServingOrderFragment(true));
|
||||
runOnUIThread(() -> {
|
||||
mView.showOrHideArrivedEndLayout(false,"","");
|
||||
mView.showOrHidePressengerCheckPager(false, "",
|
||||
"", "", "", "");
|
||||
mView.showOrHideServingOrderFragment(true);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 50 到达终点 乘客可以评价
|
||||
if (TaxiPassengerOrderStatusEnum.ArriveAtEnd.getCode() == order.orderStatus){
|
||||
TaxiPassengerModel.getInstance().recoverNaviInfo();
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.os.Looper;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
@@ -16,12 +17,14 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
|
||||
import com.mogo.eagle.core.utilcode.util.OverlayViewUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.MogoMarkerManager;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.constants.DataTypes;
|
||||
import com.mogo.och.common.module.wigets.OCHBorderShadowLayout;
|
||||
import com.mogo.och.taxi.passenger.R;
|
||||
import com.mogo.och.taxi.passenger.presenter.BaseTaxiPassengerPresenter;
|
||||
|
||||
@@ -45,6 +48,8 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
private ImageView mMapswitchBtn;
|
||||
private TaxiPassengerTrafficLightView mTrafficLightView;
|
||||
private TaxiPassengerV2XNotificationView mV2XNotificationView;
|
||||
private OCHBorderShadowLayout mStartAutopilotBtnView;
|
||||
private TextView mStartAutopilotBtn;
|
||||
|
||||
// private ConstraintLayout mArrivedEndCL;
|
||||
private WeakReference<TaxiPassengerArrivedView> mArrivedEndView;
|
||||
@@ -72,6 +77,9 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
mAutopilotImage = findViewById(R.id.module_och_autopilot_iv);
|
||||
flNaviPanelContainer = findViewById(R.id.module_mogo_och_navi_panel_container);
|
||||
|
||||
mStartAutopilotBtnView = findViewById(R.id.taxi_p_start_autopilot_shadow);
|
||||
mStartAutopilotBtn = findViewById(R.id.taxi_p_start_autopilot);
|
||||
|
||||
mTrafficLightView = findViewById(R.id.traffic_light_view);
|
||||
CallerHmiManager.INSTANCE.setProxyTrafficLightView(mTrafficLightView);
|
||||
|
||||
@@ -123,6 +131,10 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
//showOrHidePressengerCheckPager(true, "开始站点开", "开始站点开始站点开始", "2", "京A888888", "18811539480");
|
||||
//CallerHmiManager.INSTANCE.showToolsView();
|
||||
});
|
||||
|
||||
mStartAutopilotBtn.setOnClickListener(view -> {
|
||||
ToastUtils.showShort("等待接口。。。。");
|
||||
});
|
||||
}
|
||||
|
||||
private void initArrivedView(){
|
||||
@@ -264,6 +276,18 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示或者隐藏 "点击开始按钮"
|
||||
* @param isShow
|
||||
*/
|
||||
public void showOrHideStartAutopilotBtn(boolean isShow){
|
||||
if (isShow){
|
||||
mStartAutopilotBtnView.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
mStartAutopilotBtnView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示或者隐藏到达乘客站点的洁面
|
||||
* ① 取消订单 可有可无
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="80px"/>
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:type="linear"
|
||||
android:startColor="#E61980FF"
|
||||
android:endColor="#E65D8BFF" />
|
||||
|
||||
</shape>
|
||||
@@ -130,4 +130,32 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.och.common.module.wigets.OCHBorderShadowLayout
|
||||
android:id="@+id/taxi_p_start_autopilot_shadow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:bgColor="@color/taxi_p_map_bg"
|
||||
app:blurRadius="@dimen/dp_80"
|
||||
app:shadowColor="@color/taxi_p_start_autopilot_bg_shadow"
|
||||
app:shadowRadius="@dimen/dp_80"
|
||||
app:shadow_position="outer"
|
||||
app:xOffset="0px"
|
||||
app:yOffset="0px"
|
||||
android:visibility="gone"
|
||||
android:layout_marginBottom="@dimen/dp_120"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
<TextView
|
||||
android:id="@+id/taxi_p_start_autopilot"
|
||||
android:layout_width="@dimen/taxi_p_start_autopilot_btn_width"
|
||||
android:layout_height="@dimen/taxi_p_start_autopilot_btn_height"
|
||||
android:gravity="center"
|
||||
android:text="@string/taxi_p_start_autopilot_txt"
|
||||
android:textSize="@dimen/taxi_p_start_autopilot_txt_size"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/white"
|
||||
android:elevation="5dp"
|
||||
android:background="@drawable/taxi_p_start_autopilot_txt_btn_bg"/>
|
||||
</com.mogo.och.common.module.wigets.OCHBorderShadowLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -61,4 +61,8 @@
|
||||
<dimen name="taxi_p_order_route_size">50px</dimen>
|
||||
<dimen name="taxi_p_progress_des_size">34px</dimen>
|
||||
<dimen name="taxi_p_route_txt_unit_size">28px</dimen>
|
||||
|
||||
<dimen name="taxi_p_start_autopilot_txt_size">60px</dimen>
|
||||
<dimen name="taxi_p_start_autopilot_btn_width">560px</dimen>
|
||||
<dimen name="taxi_p_start_autopilot_btn_height">158px</dimen>
|
||||
</resources>
|
||||
@@ -125,4 +125,8 @@
|
||||
<dimen name="taxi_p_progress_des_size">34px</dimen>
|
||||
<dimen name="taxi_p_route_txt_unit_size">28px</dimen>
|
||||
|
||||
<dimen name="taxi_p_start_autopilot_txt_size">60px</dimen>
|
||||
<dimen name="taxi_p_start_autopilot_btn_width">560px</dimen>
|
||||
<dimen name="taxi_p_start_autopilot_btn_height">158px</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -49,6 +49,7 @@
|
||||
<color name="taxi_p_check_keyboard_bg">#B630347D</color>
|
||||
<color name="taxi_p_check_keyboard_samll_mogo_color">#151937</color>
|
||||
|
||||
<color name="taxi_p_start_autopilot_bg_shadow">#80141D45</color>
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -119,4 +119,8 @@
|
||||
<dimen name="taxi_p_order_route_size">50px</dimen>
|
||||
<dimen name="taxi_p_progress_des_size">34px</dimen>
|
||||
<dimen name="taxi_p_route_txt_unit_size">28px</dimen>
|
||||
|
||||
<dimen name="taxi_p_start_autopilot_txt_size">60px</dimen>
|
||||
<dimen name="taxi_p_start_autopilot_btn_width">560px</dimen>
|
||||
<dimen name="taxi_p_start_autopilot_btn_height">158px</dimen>
|
||||
</resources>
|
||||
@@ -31,4 +31,6 @@
|
||||
<string name="taxi_p_check_input_phone_tail_title">请输出手机号后4位:</string>
|
||||
<string name="taxi_p_check_small_mogo">小蘑菇</string>
|
||||
<string name="tv_delete">删除</string>
|
||||
|
||||
<string name="taxi_p_start_autopilot_txt">点击开始</string>
|
||||
</resources>
|
||||
@@ -50,6 +50,14 @@ public class OrderQueryRespBean extends BaseData {
|
||||
//订单多少乘客
|
||||
public String passengerNum;
|
||||
|
||||
//线路轨迹相关字段
|
||||
public long lineId; //路线id,默认-1
|
||||
public String trajUrl; //轨迹文件下载的cos url,默认“”
|
||||
public String trajMd5; //轨迹文件md5,默认“”
|
||||
public String stopUrl; //打点文件下载的cos url,默认“”
|
||||
public String stopMd5; //轨迹文件md5,默认“”
|
||||
public long timestamp; //上传轨迹完成时间戳ms:用于MEC本地手动导入轨迹验证时不会被云端轨迹覆盖
|
||||
public String vehicleModel; //[optional] 车型号(如红旗H9),默认“”,暂不加入校验逻辑、用于人工排查问题
|
||||
|
||||
// !!!接口中暂无此字段,仅用于本地实现逻辑使用:起始站目的站距离km
|
||||
public double travelDistance;
|
||||
|
||||
@@ -406,13 +406,13 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
NaviToDestinationModel.getInstance(getContext()).destroyAmaNavi();
|
||||
}
|
||||
|
||||
private void startOrEndService(String step) {
|
||||
if (step.equals(getResources().getString(R.string.module_och_taxi_order_server_end))) {//点击了完成服务,结束订单并更新订单信息
|
||||
// isHaveBeingOrder(false);
|
||||
private void startOrEndService() {
|
||||
if (mCurrentOrder == null) return;
|
||||
if (TaxiOrderStatusEnum.ArriveAtEnd.getCode() == mCurrentOrder.orderStatus) {//点击了完成服务,结束订单并更新订单信息
|
||||
mTaxiFragment.completeOrderService(TaxiOrderStatusEnum.JourneyCompleted);
|
||||
showNotice(getResources().getString(R.string.module_och_taxi_order_server_completed_tip));
|
||||
return;
|
||||
} else if (step.equals(getResources().getString(R.string.module_och_taxi_order_server_start))) {//点击服务,开启自动驾驶
|
||||
} else if (TaxiOrderStatusEnum.UserArriveAtStart.getCode() == mCurrentOrder.orderStatus) {//点击服务,开启自动驾驶
|
||||
mTaxiFragment.startAutoPilot();
|
||||
showNotice(getResources().getString(R.string.module_och_taxi_order_server_start_auto_tip));
|
||||
}
|
||||
@@ -524,7 +524,7 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
case "开始服务":
|
||||
case "服务完成":
|
||||
CallerLogger.INSTANCE.d(M_TAXI + TAG, mOrderServerStatus.getText().toString());
|
||||
startOrEndService(mOrderServerStatus.getText().toString().trim());
|
||||
startOrEndService();
|
||||
break;
|
||||
}
|
||||
} else if (v.getId() == R.id.module_och_taxi_order_cancel_iv) {
|
||||
|
||||
@@ -22,10 +22,9 @@
|
||||
<string name="module_och_taxi_order_server_start_wait_check">等待乘客验证</string>
|
||||
<string name="module_och_taxi_order_server_end">服务完成</string>
|
||||
<string name="module_och_taxi_order_server_completed_tip">车辆已停稳,请携带好随身物品,下车请注意安全</string>
|
||||
<string name="module_och_taxi_order_server_start_auto_tip">无人驾驶已启动,请您系好安全带</string>
|
||||
<string name="module_och_taxi_order_server_start_auto_tip">您好,本次自动驾驶体验里程共%1$s公里,预计需要%2$d分钟,我们即将出发。出于安全考虑,建议您尽量不要与安全员交谈,后排落座,并系好安全带</string>
|
||||
<string name="module_och_taxi_order_arrive_end_200m_tip">即将到达目的地,请拿好随身物品,准备下车</string>
|
||||
<string name="module_och_taxi_order_auto_arrive_end_tip">已到达目的地,感谢乘坐\'蘑菇车联\'无人驾驶车,期待下次相遇</string>
|
||||
|
||||
<string name="module_och_taxi_order_auto_arrive_end_tip">您好,我们已到达目的地,本次体验结束。车辆停稳,请带好随身物品,谨防遗漏。感谢您的乘坐</string>
|
||||
<string name="module_och_taxi_auto_disable_tip">自动驾驶状态为0不可用</string>
|
||||
|
||||
<string name="network_error_tip">网络异常,请稍后重试</string>
|
||||
|
||||
@@ -69,6 +69,7 @@ dependencies {
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
implementation rootProject.ext.dependencies.gson
|
||||
implementation project(':libraries:mogo-adas')
|
||||
implementation project(':libraries:mogo-adas-backgrounder-permission')
|
||||
// implementation 'com.zhidao.support.adas:high:2.6.6.0'
|
||||
// implementation 'com.zhjt.mogo.adas.data:adas-data:2.6.6.0'
|
||||
compileOnly project(':core:mogo-core-data')
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.zhidao.adas.client">
|
||||
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
<uses-permission android:name="android.permission.DEVICE_POWER"/>
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
@@ -61,6 +63,40 @@
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
|
||||
</activity>
|
||||
<!-- 开机启动 -->
|
||||
<receiver
|
||||
android:name="BootCompletedReceive"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.RECEIVE_BOOT_COMPLETED"
|
||||
android:process=":daemon">
|
||||
<intent-filter android:priority="1000">
|
||||
<action
|
||||
android:name="android.net.conn.CONNECTIVITY_CHANGE"
|
||||
tools:ignore="BatteryLife" />
|
||||
<action android:name="android.net.ethernet.ETH_STATE_CHANGED" />
|
||||
<action android:name="mitv.network.ethernet.action.ETHERNET_STATE_CHANGED" />
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
<action android:name="android.intent.action.USER_PRESENT" />
|
||||
<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
|
||||
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
|
||||
<action android:name="com.duokan.duokanplayer.BOOT_COMPLETED" />
|
||||
<action android:name="android.intent.action.LETV_SCREENON" />
|
||||
|
||||
<category android:name="android.intent.category.HOME" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="com.android.server.action.NETWORK_STATS_UPDATED" />
|
||||
<action android:name="android.intent.action.MEDIA_MOUNTED" />
|
||||
<action android:name="android.intent.action.MEDIA_UNMOUNTED" />
|
||||
<action android:name="android.intent.action.MEDIA_EJECT" />
|
||||
|
||||
<data android:scheme="file" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.zhidao.adas.client;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
public class BootCompletedReceive extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
Log.i("开机", "启动");
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,15 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class ArrivalNotification extends BaseInfo {
|
||||
public final MessagePad.ArrivalNotification bean;
|
||||
|
||||
public ArrivalNotification(MessagePad.Header header, MessagePad.ArrivalNotification bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public ArrivalNotification(MessagePad.Header header, MessagePad.ArrivalNotification bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class AutopilotState extends BaseInfo {
|
||||
public final MessagePad.AutopilotState bean;
|
||||
|
||||
public AutopilotState(MessagePad.Header header, MessagePad.AutopilotState bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public AutopilotState(MessagePad.Header header, MessagePad.AutopilotState bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
@@ -10,12 +11,14 @@ public abstract class BaseInfo {
|
||||
public final long nowTime;
|
||||
public final MessagePad.Header header;
|
||||
public final int len;
|
||||
private SimpleDateFormat sdf;
|
||||
|
||||
public BaseInfo(String action, int len, MessagePad.Header header) {
|
||||
public BaseInfo(String action, int len, MessagePad.Header header, SimpleDateFormat sdf) {
|
||||
this.action = action;
|
||||
nowTime = System.currentTimeMillis();
|
||||
this.len = 8 + header.getSerializedSize() + len;
|
||||
this.header = header;
|
||||
this.sdf = sdf;
|
||||
}
|
||||
|
||||
public BaseInfo(String action, int len) {
|
||||
@@ -27,6 +30,8 @@ public abstract class BaseInfo {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "原始数据长度:"+len + "\nHeader:[" + TextFormat.printer().escapingNonAscii(false).shortDebugString(header) + "]\n";
|
||||
return "原始数据长度:" + len + "\nHeader:[" + "MessageID:" + header.getMsgID() +
|
||||
" MessageType:" + header.getMsgType() + " 发送时间:" + sdf.format(new Date((long) (header.getTimestamp() * 1000)))
|
||||
+ " 数据源时间:" + sdf.format(new Date((long) (header.getSourceTimestamp() * 1000))) + "]\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,15 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class BasicInfoReq extends BaseInfo {
|
||||
public final MessagePad.BasicInfoReq bean;
|
||||
|
||||
public BasicInfoReq(MessagePad.Header header, MessagePad.BasicInfoReq bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public BasicInfoReq(MessagePad.Header header, MessagePad.BasicInfoReq bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class CarConfigResp extends BaseInfo {
|
||||
public final MessagePad.CarConfigResp bean;
|
||||
|
||||
public CarConfigResp(MessagePad.Header header, MessagePad.CarConfigResp bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public CarConfigResp(MessagePad.Header header, MessagePad.CarConfigResp bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class GlobalPathResp extends BaseInfo {
|
||||
public final MessagePad.GlobalPathResp bean;
|
||||
|
||||
public GlobalPathResp(MessagePad.Header header, MessagePad.GlobalPathResp bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public GlobalPathResp(MessagePad.Header header, MessagePad.GlobalPathResp bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class GnssInfo extends BaseInfo {
|
||||
public final MessagePad.GnssInfo bean;
|
||||
|
||||
public GnssInfo(MessagePad.Header header, MessagePad.GnssInfo bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public GnssInfo(MessagePad.Header header, MessagePad.GnssInfo bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,16 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
|
||||
public class MogoReportMessage extends BaseInfo {
|
||||
public final MogoReportMsg.MogoReportMessage bean;
|
||||
|
||||
public MogoReportMessage(MessagePad.Header header, MogoReportMsg.MogoReportMessage bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public MogoReportMessage(MessagePad.Header header, MogoReportMsg.MogoReportMessage bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,16 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import rule_segement.MogoPointCloudOuterClass;
|
||||
|
||||
public class MyPointCloud extends BaseInfo {
|
||||
public final MogoPointCloudOuterClass.MogoPointCloud bean;
|
||||
|
||||
public MyPointCloud(MessagePad.Header header, MogoPointCloudOuterClass.MogoPointCloud bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public MyPointCloud(MessagePad.Header header, MogoPointCloudOuterClass.MogoPointCloud bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,16 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import perception.TrafficLightOuterClass;
|
||||
|
||||
public class PerceptionTrafficLight extends BaseInfo {
|
||||
public final TrafficLightOuterClass.TrafficLights bean;
|
||||
|
||||
public PerceptionTrafficLight(MessagePad.Header header, TrafficLightOuterClass.TrafficLights bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public PerceptionTrafficLight(MessagePad.Header header, TrafficLightOuterClass.TrafficLights bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class PlanningObjects extends BaseInfo {
|
||||
public final MessagePad.PlanningObjects bean;
|
||||
|
||||
public PlanningObjects(MessagePad.Header header, MessagePad.PlanningObjects bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public PlanningObjects(MessagePad.Header header, MessagePad.PlanningObjects bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,16 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import prediction.Prediction;
|
||||
|
||||
public class PredictionObstacleTrajectory extends BaseInfo {
|
||||
public final Prediction.mPredictionObjects bean;
|
||||
|
||||
public PredictionObstacleTrajectory(MessagePad.Header header, Prediction.mPredictionObjects bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public PredictionObstacleTrajectory(MessagePad.Header header, Prediction.mPredictionObjects bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,16 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
|
||||
public class RecordPanel extends BaseInfo {
|
||||
public final RecordPanelOuterClass.RecordPanel bean;
|
||||
|
||||
public RecordPanel(MessagePad.Header header, RecordPanelOuterClass.RecordPanel bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public RecordPanel(MessagePad.Header header, RecordPanelOuterClass.RecordPanel bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,16 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import system_master.SystemStatusInfo;
|
||||
|
||||
public class StatusInfo extends BaseInfo {
|
||||
public final SystemStatusInfo.StatusInfo bean;
|
||||
|
||||
public StatusInfo(MessagePad.Header header, SystemStatusInfo.StatusInfo bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public StatusInfo(MessagePad.Header header, SystemStatusInfo.StatusInfo bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class TrackedObjects extends BaseInfo {
|
||||
private MessagePad.TrackedObjects bean;
|
||||
|
||||
public TrackedObjects(MessagePad.Header header, MessagePad.TrackedObjects bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public TrackedObjects(MessagePad.Header header, MessagePad.TrackedObjects bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class Trajectory extends BaseInfo {
|
||||
public final MessagePad.Trajectory bean;
|
||||
|
||||
public Trajectory(MessagePad.Header header, MessagePad.Trajectory bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public Trajectory(MessagePad.Header header, MessagePad.Trajectory bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -2,14 +2,16 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class VehicleState extends BaseInfo {
|
||||
public final VehicleStateOuterClass.VehicleState bean;
|
||||
|
||||
public VehicleState(MessagePad.Header header, VehicleStateOuterClass.VehicleState bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public VehicleState(MessagePad.Header header, VehicleStateOuterClass.VehicleState bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
public class Warn extends BaseInfo {
|
||||
public final MessagePad.Warn bean;
|
||||
|
||||
public Warn(MessagePad.Header header, MessagePad.Warn bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
public Warn(MessagePad.Header header, MessagePad.Warn bean, SimpleDateFormat sdf) {
|
||||
super("接收", bean.getSerializedSize(), header, sdf);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
package com.zhidao.adas.client.log;
|
||||
|
||||
import android.os.Environment;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.zhidao.adas.client.utils.Constants;
|
||||
import com.zhidao.support.adas.high.common.ThreadPoolManager;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
/**
|
||||
* 与服务器交互日志管理任务
|
||||
*/
|
||||
public class ConnectStatusSave {
|
||||
private static final String TAG = ConnectStatusSave.class.getSimpleName();
|
||||
private static final String LOG_FILE_NAME = "ConnectStatus-%s.log";//文件名称
|
||||
private volatile static ConnectStatusSave INSTANCE;
|
||||
private static final long MAX_CAPACITY = 20 * 1024 * 1024L;//单文件最大存储容量 kb
|
||||
private final LinkedBlockingQueue<String> queue;
|
||||
private BufferedWriter buff = null;
|
||||
private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss-SSS", Locale.getDefault());
|
||||
private File file;
|
||||
private volatile long capacity = MAX_CAPACITY;
|
||||
private Future future;
|
||||
|
||||
private ConnectStatusSave() {
|
||||
queue = new LinkedBlockingQueue<>();
|
||||
}
|
||||
|
||||
public static ConnectStatusSave getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
synchronized (ConnectStatusSave.class) {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = new ConnectStatusSave();
|
||||
}
|
||||
}
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
|
||||
public boolean isSdcardUse() {
|
||||
boolean bl = false;
|
||||
if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
|
||||
bl = true;
|
||||
}
|
||||
return bl;
|
||||
}
|
||||
|
||||
private synchronized void getFile() throws IOException {
|
||||
if (isSdcardUse()) {
|
||||
String time = sdf.format(new Date());
|
||||
String childPath = time.split("_")[0] + File.separator;
|
||||
file = new File(Constants.ROOT_PATH + childPath + String.format(LOG_FILE_NAME, time));
|
||||
if (!file.exists()) {
|
||||
if (!file.getParentFile().exists()) {
|
||||
file.getParentFile().mkdirs();
|
||||
}
|
||||
file.createNewFile();
|
||||
}
|
||||
FileWriter fw = new FileWriter(file, true);
|
||||
buff = new BufferedWriter(fw);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void saveLog(String info) {
|
||||
if (isStart()) {
|
||||
queue.add(info);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isStart() {
|
||||
return future != null;
|
||||
}
|
||||
|
||||
public void start() {
|
||||
if (future == null) {
|
||||
future = ThreadPoolManager.getsInstance().submit(new WriteThread());
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
if (future != null) {
|
||||
Runnable runnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
queue.clear();
|
||||
if (!future.isCancelled()) {
|
||||
future.cancel(true);
|
||||
}
|
||||
future = null;
|
||||
closeBufferedWriter();
|
||||
}
|
||||
};
|
||||
ThreadPoolManager.getsInstance().execute(runnable);
|
||||
}
|
||||
}
|
||||
|
||||
private void closeBufferedWriter() {
|
||||
if (buff != null) {
|
||||
try {
|
||||
buff.flush();
|
||||
buff.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
buff = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class WriteThread implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
synchronized (this) {
|
||||
while (!Thread.currentThread().isInterrupted()) {
|
||||
try {
|
||||
long size = 0;
|
||||
if (file != null) {
|
||||
size = file.length();
|
||||
}
|
||||
if (size > capacity || file == null || !file.exists() || buff == null) {
|
||||
closeBufferedWriter();
|
||||
getFile();
|
||||
}
|
||||
String data = queue.take();
|
||||
if (buff != null && !TextUtils.isEmpty(data)) {
|
||||
buff.write(data);
|
||||
buff.newLine();
|
||||
buff.flush();
|
||||
}
|
||||
} catch (IOException | InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.zhidao.adas.client.log;
|
||||
import android.os.Environment;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.zhidao.adas.client.utils.Constants;
|
||||
import com.zhidao.support.adas.high.common.ThreadPoolManager;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
@@ -20,7 +21,6 @@ import java.util.concurrent.LinkedBlockingQueue;
|
||||
*/
|
||||
public class LogSave {
|
||||
private static final String TAG = LogSave.class.getSimpleName();
|
||||
private static final String ROOT_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "IPCMonitoring" + File.separator;//程序外部存储跟目录
|
||||
private static final String LOG_FILE_NAME = "%s.log";//文件名称
|
||||
private volatile static LogSave INSTANCE;
|
||||
private static final long MAX_CAPACITY = 20 * 1024 * 1024L;//单文件最大存储容量 kb
|
||||
@@ -59,7 +59,7 @@ public class LogSave {
|
||||
if (isSdcardUse()) {
|
||||
String time = sdf.format(new Date());
|
||||
String childPath = time.split("_")[0] + File.separator;
|
||||
file = new File(ROOT_PATH + childPath + String.format(LOG_FILE_NAME, time));
|
||||
file = new File(Constants.ROOT_PATH + childPath + String.format(LOG_FILE_NAME, time));
|
||||
if (!file.exists()) {
|
||||
if (!file.getParentFile().exists()) {
|
||||
file.getParentFile().mkdirs();
|
||||
|
||||
@@ -7,11 +7,14 @@ import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.net.Uri;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.os.PowerManager;
|
||||
import android.provider.Settings;
|
||||
import android.text.Editable;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
@@ -71,6 +74,7 @@ import com.zhidao.adas.client.bean.TrackedObjects;
|
||||
import com.zhidao.adas.client.bean.Trajectory;
|
||||
import com.zhidao.adas.client.bean.VehicleState;
|
||||
import com.zhidao.adas.client.bean.Warn;
|
||||
import com.zhidao.adas.client.log.ConnectStatusSave;
|
||||
import com.zhidao.adas.client.log.LogSave;
|
||||
import com.zhidao.adas.client.utils.Constants;
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
@@ -88,10 +92,13 @@ import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.NetworkInterface;
|
||||
import java.net.SocketException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
@@ -107,6 +114,7 @@ import system_master.SystemStatusInfo;
|
||||
|
||||
public class MainActivity extends BaseActivity implements OnAdasListener, OnAdasConnectStatusListener, BaseAdapter.OnItemClickListener<String> {
|
||||
private final static String TAG = MainActivity.class.getSimpleName();
|
||||
private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.getDefault());
|
||||
private static final int WHAT_IPC_IP = 0x00;
|
||||
private static final int WHAT_DRIVER_IP = 0x01;
|
||||
private static final int WHAT_IPC_CONNECT_STATE = 0x02;
|
||||
@@ -115,6 +123,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
private ImageView tvIp;
|
||||
private TextView title;
|
||||
private TextView ipcIp;
|
||||
private TextView background;
|
||||
private TextView localIp;
|
||||
private View line;
|
||||
private View line1;
|
||||
@@ -161,12 +170,15 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
// LogSave.getInstance().stop();
|
||||
// }
|
||||
|
||||
PowerManager.WakeLock wakeLock;
|
||||
WifiManager.WifiLock wifiLock;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
initHandler();
|
||||
ConnectStatusSave.getInstance().start();
|
||||
isPad = isPad(this);
|
||||
if (!isPad)
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
@@ -177,6 +189,40 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
onUpdateConnectStateView();
|
||||
showIPCIP();
|
||||
canDrawOverlays();
|
||||
// PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
|
||||
// wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);
|
||||
// wakeLock.acquire();
|
||||
// int wifiLockType = WifiManager.WIFI_MODE_FULL;
|
||||
// try {
|
||||
// wifiLockType = WifiManager.class.getField("WIFI_MODE_FULL_HIGH_PERF").getInt(null);
|
||||
// } catch (Exception e) {
|
||||
// // 我们必须运行在一个pre-Honeycomb设备上。
|
||||
// Log.w(TAG, "无法获得高性能wifi锁.");
|
||||
// }
|
||||
// WifiManager wifiManager = WifiManager.class.cast(getApplicationContext().getSystemService(WIFI_SERVICE));
|
||||
// wifiLock = wifiManager.createWifiLock(wifiLockType, TAG);
|
||||
// wifiLock.acquire();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
AdasManager.getInstance().setOnAdasListener(null);
|
||||
AdasManager.getInstance().disconnect();
|
||||
if (mExecutorServiceConfigTimer != null) {
|
||||
mExecutorServiceConfigTimer.shutdownNow();
|
||||
}
|
||||
DataDistribution.getInstance().stop();
|
||||
if (floatWindow != null) {
|
||||
floatWindow.hideFloatWindow();
|
||||
floatWindow = null;
|
||||
}
|
||||
ConnectStatusSave.getInstance().stop();
|
||||
// 释放唤醒锁, 如果没有其它唤醒锁存在, 设备会很快进入休眠状态
|
||||
if (wakeLock != null)
|
||||
wakeLock.release();
|
||||
if (wifiLock != null)
|
||||
wifiLock.release();
|
||||
}
|
||||
|
||||
private void canDrawOverlays() {
|
||||
@@ -214,6 +260,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
private void initView() {
|
||||
include_title = findViewById(R.id.include_title);
|
||||
etIp = findViewById(R.id.et_ip);
|
||||
background = findViewById(R.id.background);
|
||||
role = findViewById(R.id.role);
|
||||
line = findViewById(R.id.line);
|
||||
line1 = findViewById(R.id.line1);
|
||||
@@ -477,6 +524,22 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
// String str = "后台运行:" + (AdasManager.getInstance().isPermissionLongBackgroundRunning(this) ? "<font color='red'>已优化</font>" : "<font color='red'>未优化</font>");
|
||||
// background.setText(Html.fromHtml(str, Html.FROM_HTML_MODE_LEGACY));
|
||||
// background.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
//
|
||||
//// Permission.requestAddDataSaverWhite(MainActivity.this);
|
||||
//// AdasManager.getInstance().requestIgnoreBatteryOptimizations(MainActivity.this);
|
||||
// AdasManager.getInstance().showPermissionLongBackgroundRunningDialog(MainActivity.this);
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// background.setVisibility(View.GONE);
|
||||
// }
|
||||
}
|
||||
|
||||
private void showListPopupWindow() {
|
||||
@@ -690,56 +753,56 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onTrajectory(MessagePad.Header header, MessagePad.Trajectory trajectory) {
|
||||
Trajectory base = new Trajectory(header, trajectory);
|
||||
Trajectory base = new Trajectory(header, trajectory, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTrackedObjects(MessagePad.Header header, MessagePad.TrackedObjects trackedObjects) {
|
||||
TrackedObjects base = new TrackedObjects(header, trackedObjects);
|
||||
TrackedObjects base = new TrackedObjects(header, trackedObjects, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGnssInfo(MessagePad.Header header, MessagePad.GnssInfo gnssInfo) {
|
||||
GnssInfo base = new GnssInfo(header, gnssInfo);
|
||||
GnssInfo base = new GnssInfo(header, gnssInfo, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVehicleState(MessagePad.Header header, VehicleStateOuterClass.VehicleState vehicleState) {
|
||||
VehicleState base = new VehicleState(header, vehicleState);
|
||||
VehicleState base = new VehicleState(header, vehicleState, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotState(MessagePad.Header header, MessagePad.AutopilotState autopilotState) {
|
||||
AutopilotState base = new AutopilotState(header, autopilotState);
|
||||
AutopilotState base = new AutopilotState(header, autopilotState, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReportMessage(MessagePad.Header header, MogoReportMsg.MogoReportMessage mogoReportMessage) {
|
||||
MogoReportMessage base = new MogoReportMessage(header, mogoReportMessage);
|
||||
MogoReportMessage base = new MogoReportMessage(header, mogoReportMessage, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPerceptionTrafficLight(MessagePad.Header header, TrafficLightOuterClass.TrafficLights trafficLights) {
|
||||
PerceptionTrafficLight base = new PerceptionTrafficLight(header, trafficLights);
|
||||
PerceptionTrafficLight base = new PerceptionTrafficLight(header, trafficLights, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPredictionObstacleTrajectory(MessagePad.Header header, Prediction.mPredictionObjects predictionObjects) {
|
||||
PredictionObstacleTrajectory base = new PredictionObstacleTrajectory(header, predictionObjects);
|
||||
PredictionObstacleTrajectory base = new PredictionObstacleTrajectory(header, predictionObjects, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onPointCloud(MessagePad.Header header, MogoPointCloudOuterClass.MogoPointCloud pointCloud) {
|
||||
MyPointCloud base = new MyPointCloud(header, pointCloud);
|
||||
MyPointCloud base = new MyPointCloud(header, pointCloud, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
// String data = PointCloudDecoder.decode(header, pointCloud);
|
||||
// Log.i("dddd", "data==" + data.length());
|
||||
@@ -749,13 +812,13 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onPlanningObjects(MessagePad.Header header, MessagePad.PlanningObjects planningObjects) {
|
||||
PlanningObjects base = new PlanningObjects(header, planningObjects);
|
||||
PlanningObjects base = new PlanningObjects(header, planningObjects, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBasicInfoReq(MessagePad.Header header, MessagePad.BasicInfoReq basicInfoReq) {
|
||||
BasicInfoReq info = new BasicInfoReq(header, basicInfoReq);
|
||||
BasicInfoReq info = new BasicInfoReq(header, basicInfoReq, sdf);
|
||||
DataDistribution.getInstance().addData(info);
|
||||
AdasManager.getInstance().sendBasicInfoResp("X202021111192N41VY", 0);
|
||||
showToastCenter("收到车机基础信息请求:" + info.toString());
|
||||
@@ -763,13 +826,13 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onCarConfigResp(MessagePad.Header header, MessagePad.CarConfigResp carConfigResp) {
|
||||
CarConfigResp base = new CarConfigResp(header, carConfigResp);
|
||||
CarConfigResp base = new CarConfigResp(header, carConfigResp, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecordResult(MessagePad.Header header, RecordPanelOuterClass.RecordPanel recordPanel) {
|
||||
RecordPanel base = new RecordPanel(header, recordPanel);
|
||||
RecordPanel base = new RecordPanel(header, recordPanel, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
recordKey = recordPanel.getKey();
|
||||
recordFileName = recordPanel.getFilename();
|
||||
@@ -777,25 +840,25 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
@Override
|
||||
public void onGlobalPathResp(MessagePad.Header header, MessagePad.GlobalPathResp globalPathResp) {
|
||||
GlobalPathResp base = new GlobalPathResp(header, globalPathResp);
|
||||
GlobalPathResp base = new GlobalPathResp(header, globalPathResp, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWarn(MessagePad.Header header, MessagePad.Warn warn) {
|
||||
Warn base = new Warn(header, warn);
|
||||
Warn base = new Warn(header, warn, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArrivalNotification(MessagePad.Header header, MessagePad.ArrivalNotification arrivalNotification) {
|
||||
ArrivalNotification base = new ArrivalNotification(header, arrivalNotification);
|
||||
ArrivalNotification base = new ArrivalNotification(header, arrivalNotification, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusQueryResp(MessagePad.Header header, SystemStatusInfo.StatusInfo statusInfo) {
|
||||
StatusInfo base = new StatusInfo(header, statusInfo);
|
||||
StatusInfo base = new StatusInfo(header, statusInfo, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@@ -892,21 +955,11 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
AdasManager.getInstance().setOnAdasListener(null);
|
||||
AdasManager.getInstance().disconnect();
|
||||
if (mExecutorServiceConfigTimer != null) {
|
||||
mExecutorServiceConfigTimer.shutdownNow();
|
||||
}
|
||||
DataDistribution.getInstance().stop();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onConnectionIPCStatus(int ipcConnectionStatus, String reason) {
|
||||
Log.i(TAG, "连接状态=" + (reason == null ? "主动断开连接" : reason));
|
||||
// Log.i(TAG, "连接状态=" + (reason == null ? "主动断开连接" : reason));
|
||||
String time = sdf.format(new Date());
|
||||
ConnectStatusSave.getInstance().saveLog(time + " ipcConnectionStatus=" + ipcConnectionStatus + " reason=" + reason);
|
||||
connectStatusList.add(0, new IPCConnectState(reason == null ? "主动断开连接" : reason, getStatusColor(ipcConnectionStatus)));
|
||||
if (connectStatusList.size() > 100) {
|
||||
connectStatusList.remove(connectStatusList.size() - 1);
|
||||
@@ -924,12 +977,12 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
getHandler().sendEmptyMessage(WHAT_IPC_IP);
|
||||
}
|
||||
// LogSave.getInstance().saveLog("连接状态", status);
|
||||
CupidLogUtils.i(TAG, "connectStatus=" + status);
|
||||
// CupidLogUtils.i(TAG, "connectStatus=" + status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCompatibility(VersionCompatibility versionCompatibility) {
|
||||
showToastCenter("所连工控机:\n" + versionCompatibility.toString(), Toast.LENGTH_LONG);
|
||||
showToastCenter("所连工控机:\n" + (versionCompatibility == null ? "未连接" : versionCompatibility.toString()), Toast.LENGTH_LONG);
|
||||
}
|
||||
|
||||
private void showLocalIP() {
|
||||
@@ -1023,7 +1076,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
break;
|
||||
case 2:
|
||||
//发送sn
|
||||
AdasManager.getInstance().sendBasicInfoResp("X202021111192N41VY", 1);
|
||||
AdasManager.getInstance().sendBasicInfoResp("X202021111192N41VY", 0);
|
||||
break;
|
||||
case 3:
|
||||
//数据采集5秒
|
||||
@@ -1062,7 +1115,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
.setMid(mid)
|
||||
.setRight(right)
|
||||
.build();
|
||||
AdasManager.getInstance().sendTrafficLightData("10038", 26.848153, 112.574883, "180.0", "SN", 100413, -4, 201, 0, detail);
|
||||
AdasManager.getInstance().sendTrafficLightData("10038", 26.848153, 112.574883, "180.0", "SN", 100413, -4, 201, 0, detail, System.currentTimeMillis());
|
||||
break;
|
||||
case 7:
|
||||
//速度设置
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.zhidao.adas.client.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Environment;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
@@ -8,8 +9,11 @@ import com.zhidao.adas.client.bean.AutoPilotMode;
|
||||
import com.zhidao.support.adas.high.common.JsonUtil;
|
||||
import com.zhidao.support.adas.high.common.MessageType;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* @author song kenan
|
||||
@@ -17,6 +21,9 @@ import java.util.List;
|
||||
* @date 2021/10/8
|
||||
*/
|
||||
public class Constants {
|
||||
public static final String ROOT_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "IPCMonitoring" + File.separator;//程序外部存储跟目录
|
||||
public static final String FILE_PATH = ROOT_PATH + "Crash" + File.separator;
|
||||
|
||||
private static final String ALL_PATH = "all_path";//所有路线
|
||||
private static final String DEFAULT_PATH = "[{\"endLatLon\":{\"latitude\":40.19774,\"longitude\":116.72704},\"endName\":\"汇源果汁\",\"name\":\"北京市顺义区北小营镇\",\"speedLimit\":20.0,\"startLatLon\":{\"latitude\":40.20047,\"longitude\":116.73512},\"startName\":\"13号路口西\"},{\"endLatLon\":{\"latitude\":40.19996,\"longitude\":116.73584},\"endName\":\"13号路口(主路)\",\"name\":\"北京市顺义区北小营镇\",\"speedLimit\":20.0,\"startLatLon\":{\"latitude\":40.19763,\"longitude\":116.72686},\"startName\":\"汇源果汁\"}]";
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
@@ -40,7 +39,7 @@ import java.util.Objects;
|
||||
* @since Ver 1.0 I used to be a programmer like you, then I took an arrow in the knee
|
||||
*/
|
||||
public class CrashHandler implements UncaughtExceptionHandler {
|
||||
private static final String FILE_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "IPCMonitoring" + File.separator + "Crash" + File.separator;//程序外部存储跟目录
|
||||
|
||||
/**
|
||||
* Log日志的tag
|
||||
* String : TAG
|
||||
@@ -75,7 +74,7 @@ public class CrashHandler implements UncaughtExceptionHandler {
|
||||
*
|
||||
* @since 2013-3-21下午8:46:15
|
||||
*/
|
||||
private final Map<String, String> mLogInfo = new HashMap<String, String>();
|
||||
private Map<String, String> mLogInfo = new HashMap<String, String>();
|
||||
/**
|
||||
* 用于格式化日期,作为日志文件名的一部分(FIXME 注意在windows下文件名无法使用:等符号!)
|
||||
* SimpleDateFormat : mSimpleDateFormat
|
||||
@@ -219,8 +218,11 @@ public class CrashHandler implements UncaughtExceptionHandler {
|
||||
for (Field field : mFields) {
|
||||
try {
|
||||
field.setAccessible(true);
|
||||
mLogInfo.put(field.getName(), Objects.requireNonNull(field.get("")).toString());
|
||||
} catch (IllegalArgumentException | IllegalAccessException e) {
|
||||
mLogInfo.put(field.getName(), field.get("").toString());
|
||||
Log.d(TAG, field.getName() + ":" + field.get(""));
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -270,8 +272,8 @@ public class CrashHandler implements UncaughtExceptionHandler {
|
||||
String mFileName = mContext.getPackageName() + "_Exception-" + mTime + ".log";
|
||||
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
|
||||
try {
|
||||
File mDirectory = new File(FILE_PATH);
|
||||
Log.v(TAG, mDirectory.toString());
|
||||
File mDirectory = new File(Constants.FILE_PATH);
|
||||
Log.d(TAG, mDirectory.toString());
|
||||
if (!mDirectory.exists())
|
||||
mDirectory.mkdirs();
|
||||
FileOutputStream mFileOutputStream = new FileOutputStream(mDirectory + File.separator + mFileName);
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#ffffff" />
|
||||
<stroke
|
||||
android:width="0.8dp"
|
||||
android:color="#ffffff" />
|
||||
<!-- 圆角 -->
|
||||
<corners android:radius="6dp" />
|
||||
</shape>
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog">
|
||||
android:background="@drawable/bg_adas_dialog">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
|
||||
@@ -6,23 +6,42 @@
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
<LinearLayout
|
||||
android:id="@+id/title_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/colorWhile"
|
||||
android:textSize="18dp"
|
||||
android:textStyle="bold" />
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/colorWhile"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/background"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="后台运行:"
|
||||
android:textColor="@color/colorWhile"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/role"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_toEndOf="@id/title"
|
||||
android:layout_toEndOf="@id/title_layout"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/selector_role" />
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_float"
|
||||
android:background="@drawable/bg_adas_dialog"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
|
||||
@@ -259,7 +259,8 @@ class MoGoAutopilotProvider :
|
||||
trafficLightResult.laneNo,
|
||||
trafficLightResult.arrowNo,
|
||||
trafficLightResult.flashYellow,
|
||||
trafficLightResult.toTrafficLightDetail()
|
||||
trafficLightResult.toTrafficLightDetail(),
|
||||
trafficLightResult.timeStamp
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -6,16 +6,18 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.LinearLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_version_name.view.*
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description APP版本号+MAP版本号水印显示
|
||||
* @description APP版本号+MAP版本号水印显示(只在司机屏展示)
|
||||
* @since: 2022/5/20
|
||||
*/
|
||||
class VersionNameView @JvmOverloads constructor(
|
||||
@@ -36,8 +38,11 @@ class VersionNameView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
showCurrentPadVersion()
|
||||
showCurrentMapVersion()
|
||||
//版本水印只在司机端展示
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
showCurrentPadVersion()
|
||||
showCurrentMapVersion()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,12 +71,18 @@ class VersionNameView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
//版本水印只在司机端展示
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
//版本水印只在司机端展示
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
|
||||
@@ -64,10 +64,7 @@ import com.mogo.service.statusmanager.StatusDescriptor.SEEK_HELPING
|
||||
import com.mogo.v2x.V2XManager
|
||||
import com.mogo.v2x.callback.IV2XCallback
|
||||
import com.mogo.v2x.config.V2XConfig
|
||||
import com.mogo.v2x.data.V2XAdvanceWarning
|
||||
import com.mogo.v2x.data.V2XMarkerCardResult
|
||||
import com.mogo.v2x.data.V2XOptimalRoute
|
||||
import com.mogo.v2x.data.V2XWarningTarget
|
||||
import com.mogo.v2x.data.*
|
||||
import com.mogo.v2x.event.V2XEvent
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
import com.shuyu.gsyvideoplayer.cache.CacheFactory
|
||||
@@ -78,6 +75,7 @@ import com.shuyu.gsyvideoplayer.player.PlayerFactory
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.android.asCoroutineDispatcher
|
||||
import roadwork.Road.RW_PB
|
||||
import tv.danmaku.ijk.media.player.IjkMediaPlayer
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
@@ -452,9 +450,27 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
is V2XEvent.Warning -> {
|
||||
handleWarningTargetEvent(event.data)
|
||||
}
|
||||
is V2XEvent.RoadAI -> {
|
||||
handleRoadMarkerEvent(event.data.toRoadMarker)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val RW_PB.toRoadMarker: V2XMarkerCardResult
|
||||
get() = V2XMarkerCardResult().also { l1 ->
|
||||
l1.exploreWay = ArrayList<V2XMarkerExploreWay>().also { l2 ->
|
||||
l2.add(V2XMarkerExploreWay().also { l3 ->
|
||||
l3.poiType = this.roadwork?.poiType?.toString()
|
||||
l3.generateTime = this.roadwork?.detectTime ?: 0L
|
||||
l3.location = V2XMarkerLocation().also { l4 ->
|
||||
l4.lat = this.roadwork?.center?.point?.lat ?: 0.0
|
||||
l4.lon = this.roadwork?.center?.point?.lon ?: 0.0
|
||||
l4.angle = -1.0
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleWarningTargetEvent(data: V2XWarningTarget) {
|
||||
val v2xMessageEntity = V2XMessageEntity<V2XWarningTarget>()
|
||||
v2xMessageEntity.type = V2XTypeEnum.ALERT_THE_FRONT_WEAKNESS
|
||||
|
||||
@@ -48,7 +48,8 @@ public class V2XAlarmServer {
|
||||
// 因为集合是按照距离排序后的所以这里检索出来第一个就发出警告
|
||||
for (V2XRoadEventEntity v2XRoadEventEntity : v2XRoadEventEntityList) {
|
||||
// 0、道路事件必须有朝向,角度>=0;
|
||||
if (v2XRoadEventEntity.getLocation().getAngle() >= 0) {
|
||||
boolean ignoreAngle = v2XRoadEventEntity.getLocation().getAngle() < 0;
|
||||
if (v2XRoadEventEntity.getLocation().getAngle() >= 0 || ignoreAngle) {
|
||||
// 计算车辆距离指定气泡的距离
|
||||
MarkerLocation eventLocation = v2XRoadEventEntity.getLocation();
|
||||
// 1、判断是否到达了触发距离,20 ~ 500,
|
||||
@@ -63,7 +64,7 @@ public class V2XAlarmServer {
|
||||
double carBearing = currentLocation.getBearing();
|
||||
double eventBearing = eventLocation.getAngle();
|
||||
double diffAngle = DrivingDirectionUtils.getAngleDiff(carBearing, eventBearing);
|
||||
if (diffAngle < 20) {
|
||||
if (ignoreAngle || diffAngle < 20) {
|
||||
// 3、计算当前车辆行驶方向与事件位置之间夹角《20度,保证道路事件在车辆前方
|
||||
double eventAngle = DrivingDirectionUtils.getDegreeOfCar2Poi(
|
||||
currentLocation.getLongitude(),
|
||||
@@ -72,7 +73,7 @@ public class V2XAlarmServer {
|
||||
eventLocation.getLat(),
|
||||
(int) currentLocation.getBearing()
|
||||
);
|
||||
if (0 <= eventAngle && eventAngle <= 20) {
|
||||
if (ignoreAngle || 0 <= eventAngle && eventAngle <= 20) {
|
||||
// 判断是否已经提示过道路事件
|
||||
boolean isAlreadyAlert = false;
|
||||
String lastTime = mAlertRoadEventList.get(v2XRoadEventEntity);
|
||||
|
||||
@@ -40,6 +40,7 @@ data class TrafficLightResult(
|
||||
val laneNo: Int, //车道号
|
||||
val arrowNo: Int, //当前车道对应地面要素转向
|
||||
val laneList: TrafficLightDetail, //灯态具体信息
|
||||
val flashYellow: Int// 黄灯总时间
|
||||
val flashYellow: Int,// 黄灯总时间
|
||||
val timeStamp: Long //当前卫星时间,单位:ms
|
||||
) {
|
||||
}
|
||||
@@ -63,23 +63,23 @@ SERVICE_CHAIN_VERSION=1.1.0
|
||||
LOGLIB_VERSION=1.3.0
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 网络请求LOGLIB_VERSION
|
||||
MOGO_NETWORK_VERSION=1.3.59
|
||||
MOGO_NETWORK_VERSION=1.4.1
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.3.59
|
||||
MOGO_PASSPORT_VERSION=1.4.1
|
||||
# 常链接
|
||||
MOGO_SOCKET_VERSION=1.3.59
|
||||
MOGO_SOCKET_VERSION=1.4.1
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.3.59
|
||||
MOGO_REALTIME_VERSION=1.4.1
|
||||
# 探路,道路事件发布,获取
|
||||
MOGO_TANLU_VERSION=1.3.59
|
||||
MOGO_TANLU_VERSION=1.4.1
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.3.59
|
||||
MOGO_LIVE_VERSION=1.4.1
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.3.59
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.1
|
||||
# 定位服务
|
||||
MOGO_LOCATION_VERSION=1.3.59
|
||||
MOGO_LOCATION_VERSION=1.4.1
|
||||
# 远程通讯模块
|
||||
MOGO_TELEMATIC_VERSION=1.3.59
|
||||
MOGO_TELEMATIC_VERSION=1.4.1
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.2.0.9
|
||||
@@ -155,7 +155,7 @@ MOGO_OCH_TAXI_VERSION=2.0.66
|
||||
# mogoAiCloud sdk services
|
||||
MOGO_AICLOUD_SERVICES_SDK_VERSION=2.1.16.10
|
||||
# v2x-sdk
|
||||
MOGO_V2X_SDK_VERSION=1.3.59
|
||||
MOGO_V2X_SDK_VERSION=1.4.1
|
||||
################# 旧版本架构模块版本 #################
|
||||
|
||||
|
||||
|
||||
1
libraries/mogo-adas-backgrounder-permission/.gitignore
vendored
Normal file
1
libraries/mogo-adas-backgrounder-permission/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
463
libraries/mogo-adas-backgrounder-permission/README.md
Normal file
463
libraries/mogo-adas-backgrounder-permission/README.md
Normal file
@@ -0,0 +1,463 @@
|
||||
#### 说明
|
||||
# ADAS LIB
|
||||
## 与工控机交互LIB
|
||||
|
||||
# 使用方法参见【app_ipc_monitoring】中的代码
|
||||
|
||||
## 可用接口
|
||||
~~~java
|
||||
/**
|
||||
* 设置多设备监听
|
||||
*
|
||||
* @param l 监听
|
||||
*/
|
||||
AdasManager.getInstance().setOnMultiDeviceListener(OnMultiDeviceListener l);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 设置工控机数据监听
|
||||
*
|
||||
* @param l 监听
|
||||
*/
|
||||
AdasManager.getInstance().setOnAdasListener(OnAdasListener l);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 创建一个连接
|
||||
*
|
||||
* @param options 连接参数
|
||||
* @param onAdasConnectStatusListener 连接状态监听
|
||||
*/
|
||||
AdasManager.getInstance().create(AdasOptions options, OnAdasConnectStatusListener onAdasConnectStatusListener);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* ADAS LIB 版本
|
||||
*
|
||||
* @return 版本
|
||||
*/
|
||||
AdasManager.getInstance().getAdasVersion();
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 获取协议版本
|
||||
*
|
||||
* @return 版本
|
||||
*/
|
||||
AdasManager.getInstance().getProtocolVersion();
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 获取工控机配置信息
|
||||
*
|
||||
* @return 配置信息 未连接为null 断开连接会清空
|
||||
*/
|
||||
AdasManager.getInstance().getCarConfig();
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 连接工控机
|
||||
*/
|
||||
AdasManager.getInstance().connect();
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 与工控机断开连接
|
||||
*/
|
||||
AdasManager.getInstance().disconnect();
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 获取当前工控机的链接状态
|
||||
*
|
||||
* @return {@link Constants.IPC_CONNECTION_STATUS}
|
||||
*/
|
||||
AdasManager.getInstance().getIpcConnectionStatus();
|
||||
~~~
|
||||
~~~java
|
||||
|
||||
/**
|
||||
* Log是否开启打印
|
||||
*/
|
||||
AdasManager.getInstance().setEnableLog(boolean isEnableLog);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 系统命令请求, 比如系统重启,启用新镜像
|
||||
*
|
||||
* @param type SystemCmdType。SYSTEMCMD_REBOOT 重启所有节点
|
||||
* SystemCmdType。SYSTEMCMD_EMPLOY_NEW_IMAGE 使用新镜像(推镜像)
|
||||
* SystemCmdType。SYSTEMCMD_SHUT_DOWN 关机
|
||||
* @return boolean
|
||||
*/
|
||||
AdasManager.getInstance().sendSystemCmdReq(@NonNull MessagePad.SystemCmdType type);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 解析工控机发送过来的数据
|
||||
* 多设备时使用
|
||||
*
|
||||
* @param bytes 数据
|
||||
*/
|
||||
AdasManager.getInstance().parseIPCData(byte[] bytes);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 获取工控机链接配置
|
||||
*
|
||||
* @return 工控机链接参数
|
||||
*/
|
||||
AdasManager.getInstance().getAdasOptions();
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 获取已经链接成功的工控机IP 未连接为null
|
||||
*
|
||||
* @return ip null:表示未连接
|
||||
*/
|
||||
AdasManager.getInstance().getIpcConnectedIp();
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 获取已经链接成功的工控机端口
|
||||
*
|
||||
* @return 端口 未连接为默认端口
|
||||
*/
|
||||
AdasManager.getInstance().getIpcConnectedPort();
|
||||
~~~
|
||||
~~~java
|
||||
|
||||
/**
|
||||
* 自动驾驶设备基础信息应答
|
||||
*
|
||||
* @param sn SN
|
||||
* @param environment 1: 研发环境, 2:测试环境, 3:生产环境 4:演示环境
|
||||
* @return
|
||||
*/
|
||||
AdasManager.getInstance().sendBasicInfoResp(@NonNull String sn, int environment);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 设置自动驾驶模式 启动自动驾驶
|
||||
*
|
||||
* @param mode 1: enter autopilot mode, 0: quit autopilot mode
|
||||
* @param source 命令来源: 0: pad模拟(模拟时routeInfo传null), 1: AICloud业务
|
||||
* @param routeInfo 自动驾驶路径信息
|
||||
* @return
|
||||
*/
|
||||
AdasManager.getInstance().sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 设置演示模式
|
||||
*
|
||||
* @param enable 1: enable, 0: disable
|
||||
* @return
|
||||
*/
|
||||
AdasManager.getInstance().sendDemoModeReq(int enable);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 车机基础信息请求
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
AdasManager.getInstance().sendCarConfigReq();
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 记录人工接管原因
|
||||
*
|
||||
* @param key bag key 唯一标识
|
||||
* @param filename 文件路径
|
||||
* @param reasonID 接管原因id
|
||||
* @param reason 接管原因
|
||||
* @return
|
||||
*/
|
||||
AdasManager.getInstance().sendRecordCause(long key, @NonNull String filename, @NonNull String reasonID, @NonNull String reason);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 同下
|
||||
*
|
||||
* @param id
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
AdasManager.getInstance().startRecordPackage(int id, int type);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 同下
|
||||
*
|
||||
* @param id
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
AdasManager.getInstance().startRecordPackage(int id, int duration, int type);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 同下
|
||||
*
|
||||
* @param id
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
|
||||
AdasManager.getInstance().stopRecordPackage(int id, int type);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 数据采集请求 主动录制Bag包
|
||||
*
|
||||
* @param id 采集id
|
||||
* @param duration 采集时间长
|
||||
* @param type 采集类型, 1:badcase, 2: map; 3: rests
|
||||
* @param isRecord 采集指令, true: 采集, false: 停止采集
|
||||
* @param sustain 是否持续采集
|
||||
* @return
|
||||
*/
|
||||
|
||||
AdasManager.getInstance().sendRecordData(int id, int duration, int type, boolean isRecord);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 设置自动驾驶最大速度
|
||||
*
|
||||
* @param speedLimit 最大车辆速度 m/s
|
||||
* @return
|
||||
*/
|
||||
AdasManager.getInstance().sendAutopilotSpeedReq(double speedLimit);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 发送红绿灯数据到工控机
|
||||
*
|
||||
* @param crossID roadID
|
||||
* @param latitude
|
||||
* @param longitude
|
||||
* @param heading 红绿灯方向
|
||||
* @param direction 路的航向角
|
||||
* @param lightId 红绿灯ID
|
||||
* @param laneNo 车道号
|
||||
* @param arrowNo 当前车道对应地面要素转向
|
||||
* @param flashYellow 黄灯总时间
|
||||
* @param laneDetail 灯态具体信息
|
||||
* @return
|
||||
*/
|
||||
AdasManager.getInstance().sendTrafficLightData(@NonNull String crossID, double latitude, double longitude, @NonNull String heading, @NonNull String direction, int lightId, int laneNo, int arrowNo, int flashYellow, MessagePad.TrafficLightDetail laneDetail);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 自动驾驶路径请求
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
AdasManager.getInstance().sendGlobalPathReq();
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 获取工控机固定IP列表
|
||||
*
|
||||
* @return 返回默认工控机IP列表
|
||||
*/
|
||||
AdasManager.getInstance().getIPCFixationIPList(Context context);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 增加工控机固定IP
|
||||
*
|
||||
* @param ipcIP IP
|
||||
*/
|
||||
AdasManager.getInstance().addIPCFixationIP(Context context, String ipcIP);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 删除指定的工控机固定IP
|
||||
*
|
||||
* @param ipcIP IP
|
||||
*/
|
||||
AdasManager.getInstance().delIPCFixationIP(Context context, String ipcIP);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 删除所有工控机固定IP
|
||||
*/
|
||||
AdasManager.getInstance().delIPCFixationIP(Context context);
|
||||
~~~
|
||||
|
||||
|
||||
## OnAdasListener
|
||||
### 工控机数据回调
|
||||
#### 回调中对象的字段详情参见各个proto文件
|
||||
~~~java
|
||||
/**
|
||||
* 自动驾驶局部轨迹 前车引导线
|
||||
*
|
||||
* @param header 头
|
||||
* @param trajectory 数据
|
||||
*/
|
||||
void onTrajectory(MessagePad.Header header, MessagePad.Trajectory trajectory);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 障碍物 他车数据
|
||||
*
|
||||
* @param header 头
|
||||
* @param trackedObjects 数据
|
||||
*/
|
||||
void onTrackedObjects(MessagePad.Header header, MessagePad.TrackedObjects trackedObjects);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 惯导信息
|
||||
*
|
||||
* @param header 头
|
||||
* @param gnssInfo 数据
|
||||
*/
|
||||
void onGnssInfo(MessagePad.Header header, MessagePad.GnssInfo gnssInfo);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 底盘信息, 透传底盘状态,pb参考底盘
|
||||
*
|
||||
* @param header 头
|
||||
* @param vehicleState 数据
|
||||
*/
|
||||
void onVehicleState(MessagePad.Header header, VehicleStateOuterClass.VehicleState vehicleState);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 自动驾驶状态
|
||||
*
|
||||
* @param header 头
|
||||
* @param autopilotState 数据
|
||||
*/
|
||||
void onAutopilotState(MessagePad.Header header, MessagePad.AutopilotState autopilotState);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 监控事件报告
|
||||
*
|
||||
* @param header 头
|
||||
* @param mogoReportMessage 数据
|
||||
*/
|
||||
void onReportMessage(MessagePad.Header header, MogoReportMsg.MogoReportMessage mogoReportMessage);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 感知红绿灯
|
||||
*
|
||||
* @param header 头
|
||||
* @param trafficLights 感知红绿灯
|
||||
*/
|
||||
void onPerceptionTrafficLight(MessagePad.Header header, TrafficLightOuterClass.TrafficLights trafficLights);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 他车轨迹预测
|
||||
*
|
||||
* @param header 头
|
||||
* @param predictionObjects 他车轨迹预测数据
|
||||
*/
|
||||
void onPredictionObstacleTrajectory(MessagePad.Header header, Prediction.mPredictionObjects predictionObjects);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 自动驾驶设备基础信息请求
|
||||
*
|
||||
* @param header 头
|
||||
* @param basicInfoReq 数据 目前没有任何参数
|
||||
*/
|
||||
void onBasicInfoReq(MessagePad.Header header, MessagePad.BasicInfoReq basicInfoReq);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 车机基础信息应答
|
||||
*
|
||||
* @param header 头
|
||||
* @param carConfigResp 数据
|
||||
*/
|
||||
void onCarConfigResp(MessagePad.Header header, MessagePad.CarConfigResp carConfigResp);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 数据采集结果
|
||||
*
|
||||
* @param header 头
|
||||
* @param recordPanel 数据
|
||||
*/
|
||||
void onRecordResult(MessagePad.Header header, RecordPanelOuterClass.RecordPanel recordPanel);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 自动驾驶路径应答
|
||||
*
|
||||
* @param header 头
|
||||
* @param globalPathResp 数据
|
||||
*/
|
||||
void onGlobalPathResp(MessagePad.Header header, MessagePad.GlobalPathResp globalPathResp);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 报警信息
|
||||
* 暂时保留,目前没有使用
|
||||
*
|
||||
* @param header 头
|
||||
* @param warn 数据
|
||||
*/
|
||||
@Deprecated
|
||||
void onWarn(MessagePad.Header header, MessagePad.Warn warn);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 到站提醒 自动驾驶站点
|
||||
*
|
||||
* @param header 头
|
||||
* @param arrivalNotification 数据
|
||||
*/
|
||||
void onArrivalNotification(MessagePad.Header header, MessagePad.ArrivalNotification arrivalNotification);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 向IPC发送命令返回结果
|
||||
*
|
||||
* @param info
|
||||
*/
|
||||
void onSSHResult(SSHResult info);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 数据错误
|
||||
*
|
||||
* @param status 错误原因
|
||||
* @param bytes 原始数据
|
||||
*/
|
||||
void onError(ProtocolStatus status, byte[] bytes);
|
||||
~~~
|
||||
|
||||
## OnAdasConnectStatusListener
|
||||
### 连接状态监听
|
||||
~~~java
|
||||
/**
|
||||
* 与工控机链接状态变化
|
||||
*
|
||||
* @param ipcConnectionStatus {@link Constants.IPC_CONNECTION_STATUS}
|
||||
* @param reason 连接信息 需要判null
|
||||
* 如果ipcConnectionStatus==Constants.IPC_CONNECTION_STATUS.DISCONNECTED&&reason==null 表示主动断开连接
|
||||
*/
|
||||
void onConnectionIPCStatus(@Define.IPCConnectionStatus int ipcConnectionStatus, @Nullable String reason);
|
||||
~~~
|
||||
|
||||
## OnMultiDeviceListener
|
||||
### 多设备链接监听
|
||||
~~~java
|
||||
/**
|
||||
* 转发工控机消息
|
||||
* 如果是客户端此回调不会被调用
|
||||
*
|
||||
* @param bytes 数据
|
||||
*/
|
||||
void onForwardingIPCMessage(byte[] bytes);
|
||||
~~~
|
||||
36
libraries/mogo-adas-backgrounder-permission/build.gradle
Normal file
36
libraries/mogo-adas-backgrounder-permission/build.gradle
Normal file
@@ -0,0 +1,36 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
// buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
// versionCode Integer.valueOf(VERSION_CODE)
|
||||
// versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
||||
//
|
||||
// buildConfigField "String", "AP_VERSION", "\"${AP_VERSION}\""
|
||||
versionCode rootProject.versionCode as int
|
||||
versionName rootProject.versionName
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
GROUP=com.mogo.adas
|
||||
POM_ARTIFACT_ID=mogo-adas
|
||||
VERSION_CODE=1
|
||||
26
libraries/mogo-adas-backgrounder-permission/proguard-rules.pro
vendored
Normal file
26
libraries/mogo-adas-backgrounder-permission/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
#-----MogoMap-----
|
||||
-keep class com.mogo.map.MogoNavi{
|
||||
private <init>();
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.zhidao.support.adas.high.permission">
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||
|
||||
<application>
|
||||
|
||||
<activity
|
||||
android:name=".dialog.PermissionLongBackgroundRunningDialog"
|
||||
android:theme="@style/PermissionLongBackgroundRunningDialogStyle" />
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.zhidao.support.adas.high.permission;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.Uri;
|
||||
import android.os.PowerManager;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
|
||||
import com.zhidao.support.adas.high.permission.dialog.PermissionLongBackgroundRunningDialog;
|
||||
|
||||
|
||||
/**
|
||||
* 长时间后台运行权限检查
|
||||
*/
|
||||
public class BackgrounderPermission {
|
||||
|
||||
|
||||
|
||||
public void showPermissionLongBackgroundRunningDialog(Context context) {
|
||||
Intent intent = new Intent(context, PermissionLongBackgroundRunningDialog.class);
|
||||
context.startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前是否开启电池优化
|
||||
*
|
||||
* @param context 上下文
|
||||
* @return 否在设备的电源白名单上 true 表示未优化
|
||||
*/
|
||||
public boolean isIgnoringBatteryOptimizations(Context context) {
|
||||
boolean isIgnoring = false;
|
||||
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||
if (powerManager != null) {
|
||||
isIgnoring = powerManager.isIgnoringBatteryOptimizations(context.getPackageName());
|
||||
}
|
||||
return isIgnoring;
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请 关闭电池优化权限
|
||||
*
|
||||
* @param context
|
||||
*/
|
||||
public void requestIgnoreBatteryOptimizations(Context context) {
|
||||
Intent intent = new Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
|
||||
intent.setData(Uri.parse("package:" + context.getPackageName()));
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否忽略计费网络限制
|
||||
* 后台运行时网络限制
|
||||
*
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
|
||||
public boolean isIgnoringMeteredNetworkRestrictions(Context context) {
|
||||
ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
// 检查设备是否在计费网络
|
||||
// if (connMgr.isActiveNetworkMetered()) {
|
||||
// Checks user’s Data Saver settings.
|
||||
switch (connMgr.getRestrictBackgroundStatus()) {
|
||||
case ConnectivityManager.RESTRICT_BACKGROUND_STATUS_ENABLED:
|
||||
// 用户已为此应用启用流量节省程序。应用应努力限制前台流量消耗,并妥善处理后台流量消耗限制。
|
||||
Log.i("Permission", "用户已为此应用启用流量节省程序。应用应努力限制前台流量消耗,并妥善处理后台流量消耗限制。");
|
||||
return false;
|
||||
case ConnectivityManager.RESTRICT_BACKGROUND_STATUS_WHITELISTED:
|
||||
// 用户已启用流量节省程序,但应用在白名单中。应用应努力限制前台和后台流量消耗。
|
||||
Log.i("Permission", "用户已启用流量节省程序,但应用在白名单中。应用应努力限制前台和后台流量消耗。");
|
||||
return false;
|
||||
case ConnectivityManager.RESTRICT_BACKGROUND_STATUS_DISABLED:
|
||||
// 流量节省程序已停用。
|
||||
Log.i("Permission", "流量节省程序已停用。");
|
||||
return true;
|
||||
}
|
||||
// } else {
|
||||
// // 设备不在计费网络,为所欲为
|
||||
// Log.i("Permission","设备不在计费网络,为所欲为");
|
||||
// return true;
|
||||
// }
|
||||
Log.i("dddd", "其他");
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 除非应用的核心功能受到不利影响,否则 Google Play 政策禁止应用请求直接豁免 Android 6.0+ 中的电源管理功能(低电耗模式和应用待机模式)
|
||||
*/
|
||||
public static void requestAddDataSaverWhite(Context context) {
|
||||
// ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
// if (connMgr != null && connMgr.getRestrictBackgroundStatus() == ConnectivityManager.RESTRICT_BACKGROUND_STATUS_ENABLED) {
|
||||
Intent intent = new Intent(Settings.ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS);
|
||||
intent.setData(Uri.parse("package:" + context.getPackageName()));
|
||||
context.startActivity(intent);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否允许长时间后台运行
|
||||
*
|
||||
* @param context 上下文
|
||||
* @return
|
||||
*/
|
||||
public boolean isPermissionLongBackgroundRunning(Context context) {
|
||||
return isIgnoringBatteryOptimizations(context) && isIgnoringMeteredNetworkRestrictions(context);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.zhidao.support.adas.high.permission.dialog;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.zhidao.support.adas.high.permission.R;
|
||||
|
||||
/**
|
||||
* 数据用量及电池优化 权限申请
|
||||
* 高版本Android系统会针对熄屏、休眠或后台 对电池WiFi等进行优化,长时间网络可能会断开连接
|
||||
*/
|
||||
public class PermissionLongBackgroundRunningDialog extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
overridePendingTransition(R.anim.dialog_in, R.anim.dialog_out);
|
||||
setContentView(R.layout.dialog_adas_permission_long_background_running);
|
||||
// //设置弹出窗口与屏幕对齐
|
||||
// Window win = this.getWindow();
|
||||
// int density = (int) (getResources().getDisplayMetrics().density + 0.5f);
|
||||
////设置内边距,这里设置为10dp
|
||||
// win.getDecorView().setPadding(10 * density, 10 * density, 10 * density, 10 * density);
|
||||
// WindowManager.LayoutParams lp = win.getAttributes();
|
||||
////设置窗口宽度
|
||||
// lp.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
////设置窗口高度
|
||||
// lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
////设置Dialog位置
|
||||
// lp.gravity = Gravity.TOP;
|
||||
// win.setAttributes(lp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish() {
|
||||
super.finish();
|
||||
//在此时设置转场动画
|
||||
overridePendingTransition(R.anim.dialog_out, R.anim.dialog_in);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromYDelta="50%"
|
||||
android:toYDelta="100%" />
|
||||
|
||||
<alpha
|
||||
android:duration="300"
|
||||
android:fromAlpha="0"
|
||||
android:toAlpha="1" />
|
||||
|
||||
</set>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromYDelta="50%"
|
||||
android:toYDelta="0" />
|
||||
|
||||
<alpha
|
||||
android:duration="300"
|
||||
android:fromAlpha="0"
|
||||
android:toAlpha="1" />
|
||||
|
||||
</set>
|
||||
@@ -3,7 +3,7 @@
|
||||
<solid android:color="#FAFFFFFF" />
|
||||
<stroke
|
||||
android:width="0.8dp"
|
||||
android:color="#A140E0D0" />
|
||||
android:color="#81666666" />
|
||||
<!-- 圆角 -->
|
||||
<corners android:radius="6dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_adas_dialog"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="由于系统默认启动了电池优化功能,此功会影响熄屏或休眠后网络连接"
|
||||
android:textColor="#000000" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">adas-backgrounder-permission</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,21 @@
|
||||
<resources>
|
||||
|
||||
<style name="PermissionLongBackgroundRunningDialogStyle" parent="Theme.AppCompat.Dialog">
|
||||
<!--设置dialog的背景-->
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<!--设置Dialog的windowFrame框为无-->
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<!--设置无标题-->
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<!--是否浮现在activity之上-->
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<!--是否半透明-->
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<!--设置窗口内容不覆盖-->
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<!--背景是否模糊显示-->
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -40,13 +40,14 @@ enum MessageType
|
||||
MsgTypeTrajectoryDownloadReq = 0x10110; //轨迹下载请求
|
||||
MsgTypeStatusQueryReq = 0x10111; //状态查询请求
|
||||
MsgTypeStatusQueryResp = 0x10112; //状态查询应答
|
||||
MsgTypeSetRainModeReq = 0x10113; //设置雨天模式
|
||||
}
|
||||
|
||||
message Header
|
||||
{
|
||||
uint64 msgID = 1; //消息唯一id,自增
|
||||
MessageType msgType = 2; //消息类型
|
||||
double timestamp = 3; //telematics消息发送时间, 单位:秒
|
||||
double timestamp = 3; //消息发送时间, 单位:秒
|
||||
double sourceTimestamp = 4; //数据源消息发送时间, 单位:秒
|
||||
}
|
||||
|
||||
@@ -298,6 +299,7 @@ message TrafficLightData
|
||||
int32 arrowNo = 8; //当前车道对应地面要素转向
|
||||
int32 flashYellow = 9; //黄灯总时间
|
||||
TrafficLightDetail laneDetail = 10; //灯态具体信息
|
||||
uint64 timestamp =11;//当前卫星时间, 单位: ms
|
||||
}
|
||||
|
||||
// message definition for MsgTypeWarn
|
||||
@@ -337,5 +339,9 @@ message StatusQueryReq
|
||||
// message definition for MsgTypeStatusQueryResp
|
||||
// refer to system_status_info.proto
|
||||
|
||||
|
||||
// message definition for MsgTypeSetRainModeReq
|
||||
message SetRainModeReq
|
||||
{
|
||||
uint32 enable = 1; //1: enable, 0: disable
|
||||
}
|
||||
|
||||
|
||||
@@ -794,12 +794,13 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
* @param arrowNo 当前车道对应地面要素转向
|
||||
* @param flashYellow 黄灯总时间
|
||||
* @param laneDetail 灯态具体信息
|
||||
* @param timestamp 当前卫星时间, 单位: ms
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean sendTrafficLightData(@NonNull String crossID, double latitude, double longitude,
|
||||
@NonNull String heading, @NonNull String direction, int lightId, int laneNo,
|
||||
int arrowNo, int flashYellow, MessagePad.TrafficLightDetail laneDetail) {
|
||||
int arrowNo, int flashYellow, MessagePad.TrafficLightDetail laneDetail, long timestamp) {
|
||||
if (crossID == null) {
|
||||
crossID = "";
|
||||
}
|
||||
@@ -821,6 +822,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
builder.setFlashYellow(flashYellow);
|
||||
if (laneDetail != null)
|
||||
builder.setLaneDetail(laneDetail);
|
||||
builder.setTimestamp(timestamp);
|
||||
MessagePad.TrafficLightData req = builder.build();
|
||||
return sendWsMessage(MessageType.TYPE_SEND_TRAFFIC_LIGHT_DATA.typeCode, req.toByteArray());
|
||||
}
|
||||
@@ -875,5 +877,21 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
.build();
|
||||
return sendWsMessage(MessageType.TYPE_SEND_STATUS_QUERY_REQ.typeCode, req.toByteArray());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置雨天模式
|
||||
*
|
||||
* @param enable 1: enable, 0: disable
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRainModeReq(int enable) {
|
||||
MessagePad.SetRainModeReq req = MessagePad.SetRainModeReq
|
||||
.newBuilder()
|
||||
.setEnable(enable)
|
||||
.build();
|
||||
return sendWsMessage(MessageType.TYPE_SEND_SET_RAIN_MODE_REQ.typeCode, req.toByteArray());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -365,11 +365,12 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
* @param arrowNo 当前车道对应地面要素转向
|
||||
* @param flashYellow 黄灯总时间
|
||||
* @param laneDetail 灯态具体信息
|
||||
* @param timestamp 当前卫星时间, 单位: ms
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean sendTrafficLightData(@NonNull String crossID, double latitude, double longitude, @NonNull String heading, @NonNull String direction, int lightId, int laneNo, int arrowNo, int flashYellow, MessagePad.TrafficLightDetail laneDetail) {
|
||||
return mChannel != null && mChannel.sendTrafficLightData(crossID, latitude, longitude, heading, direction, lightId, laneNo, arrowNo, flashYellow, laneDetail);
|
||||
public boolean sendTrafficLightData(@NonNull String crossID, double latitude, double longitude, @NonNull String heading, @NonNull String direction, int lightId, int laneNo, int arrowNo, int flashYellow, MessagePad.TrafficLightDetail laneDetail, long timestamp) {
|
||||
return mChannel != null && mChannel.sendTrafficLightData(crossID, latitude, longitude, heading, direction, lightId, laneNo, arrowNo, flashYellow, laneDetail, timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -416,6 +417,17 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
return mChannel != null && mChannel.sendStatusQueryReq();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置雨天模式
|
||||
*
|
||||
* @param enable 1: enable, 0: disable
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRainModeReq(int enable) {
|
||||
return mChannel != null && mChannel.sendRainModeReq(enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工控机固定IP列表
|
||||
*
|
||||
|
||||
@@ -157,11 +157,12 @@ public interface IAdasNetCommApi {
|
||||
* @param arrowNo 当前车道对应地面要素转向
|
||||
* @param flashYellow 黄灯总时间
|
||||
* @param laneDetail 灯态具体信息
|
||||
* @param timestamp 当前卫星时间, 单位: ms
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendTrafficLightData(@NonNull String crossID, double latitude, double longitude,
|
||||
@NonNull String heading, @NonNull String direction, int lightId, int laneNo,
|
||||
int arrowNo, int flashYellow, MessagePad.TrafficLightDetail laneDetail);
|
||||
int arrowNo, int flashYellow, MessagePad.TrafficLightDetail laneDetail, long timestamp);
|
||||
|
||||
/**
|
||||
* 自动驾驶路径请求
|
||||
@@ -195,6 +196,13 @@ public interface IAdasNetCommApi {
|
||||
*/
|
||||
boolean sendStatusQueryReq();
|
||||
|
||||
/**
|
||||
* 设置雨天模式
|
||||
*
|
||||
* @param enable 1: enable, 0: disable
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendRainModeReq(int enable);
|
||||
// TODO 需求暂停 待讨论
|
||||
// boolean getRoutes();
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@ public enum MessageType {
|
||||
TYPE_SEND_SYSTEM_CMD_REQ(MessagePad.MessageType.MsgTypeSystemCmdReq, "系统命令请求, 比如系统重启,启用新镜像"),
|
||||
TYPE_SEND_TRAJECTORY_DOWNLOAD_REQ(MessagePad.MessageType.MsgTypeTrajectoryDownloadReq, "轨迹下载请求"),
|
||||
TYPE_SEND_STATUS_QUERY_REQ(MessagePad.MessageType.MsgTypeStatusQueryReq, "状态查询请求"),
|
||||
TYPE_RECEIVE_STATUS_QUERY_RESP(MessagePad.MessageType.MsgTypeStatusQueryResp, "状态查询应答");
|
||||
TYPE_RECEIVE_STATUS_QUERY_RESP(MessagePad.MessageType.MsgTypeStatusQueryResp, "状态查询应答"),
|
||||
TYPE_SEND_SET_RAIN_MODE_REQ(MessagePad.MessageType.MsgTypeSetRainModeReq, "设置雨天模式");
|
||||
|
||||
/**
|
||||
* 消息action code
|
||||
|
||||
@@ -62,6 +62,7 @@ include ':libraries:mogo-map-api'
|
||||
include ':libraries:mogo-map'
|
||||
include ':libraries:mogo-adas'
|
||||
include ':libraries:mogo-adas-data'
|
||||
include ':libraries:mogo-adas-backgrounder-permission'
|
||||
|
||||
// OLD业务模块
|
||||
include ':modules:mogo-module-common'
|
||||
|
||||
Reference in New Issue
Block a user