[add] 弹框临时测试入口添加 路由接口增加
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
package com.mogo.module.main.monitoring;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
|
||||
/**
|
||||
* @author liujing
|
||||
* @description 车辆监控
|
||||
* @since: 8/16/21
|
||||
*/
|
||||
public class VehicleMonitoring implements Handler.Callback {
|
||||
|
||||
private final Context mContext;
|
||||
private final Handler mHandler = new Handler();
|
||||
//自动驾驶状态下10分钟弹框提示一次
|
||||
private static final long AUTO_CHECK_STATUS_DELAY = 10 * 60 * 1000;
|
||||
private static final int AUTO_CHECK_STATUS = 10001;
|
||||
private static final int MANUAL_CHECK_STATUS = 10002;
|
||||
|
||||
public VehicleMonitoring(Context context) {
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
public void vehicleCheckForAuto() {
|
||||
mHandler.sendEmptyMessageDelayed(AUTO_CHECK_STATUS, AUTO_CHECK_STATUS_DELAY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleMessage(Message msg) {
|
||||
switch (msg.what) {
|
||||
case AUTO_CHECK_STATUS:
|
||||
|
||||
return true;
|
||||
case MANUAL_CHECK_STATUS:
|
||||
return true;
|
||||
default:
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.main.EventDispatchCenter;
|
||||
import com.mogo.module.main.cards.MogoModulesManager;
|
||||
import com.mogo.module.main.delaycheck.DelayCheckUtil;
|
||||
import com.mogo.module.main.monitoring.VehicleMonitoring;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -52,6 +53,9 @@ class MogoMainService extends Service implements IMogoLocationListener {
|
||||
// 开启延时检测
|
||||
DelayCheckUtil delayCheckUtil = new DelayCheckUtil(this);
|
||||
delayCheckUtil.waitingForCheck();
|
||||
//车辆检测
|
||||
VehicleMonitoring monitoring = new VehicleMonitoring(this);
|
||||
monitoring.vehicleCheckForAuto();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user