@@ -353,8 +353,6 @@ public class MogoADASController implements IMogoADASController {
|
||||
|
||||
//测试网约车
|
||||
//testOCH();
|
||||
// TODO: 2021/6/30 临时解决方案
|
||||
timeLoop();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -758,7 +756,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
adasProvider.removeAdasStatusListener();
|
||||
//AutopilotServiceManage.getInstance().release();
|
||||
//关闭定时任务
|
||||
if (mDisposable != null) mDisposable.dispose();
|
||||
// if (mDisposable != null) mDisposable.dispose();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -946,22 +944,22 @@ public class MogoADASController implements IMogoADASController {
|
||||
mAdasDataListener.cameraEyeDetectResult(json);
|
||||
}
|
||||
|
||||
|
||||
private static final int PERIOD = 5 * 1000;
|
||||
private static final int DELAY = 10000;
|
||||
private Disposable mDisposable;
|
||||
|
||||
/**
|
||||
* 定时循环任务
|
||||
*/
|
||||
private void timeLoop() {
|
||||
mDisposable = Observable.interval(DELAY, PERIOD, TimeUnit.MILLISECONDS)
|
||||
.map((aLong -> aLong + 1))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(aLong ->
|
||||
adasProvider.setBasicInfo()
|
||||
);//getUnreadCount()执行的任务
|
||||
}
|
||||
//
|
||||
// private static final int PERIOD = 5 * 1000;
|
||||
// private static final int DELAY = 10000;
|
||||
// private Disposable mDisposable;
|
||||
//
|
||||
// /**
|
||||
// * 定时循环任务
|
||||
// */
|
||||
// private void timeLoop() {
|
||||
// mDisposable = Observable.interval(DELAY, PERIOD, TimeUnit.MILLISECONDS)
|
||||
// .map((aLong -> aLong + 1))
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .subscribe(aLong ->
|
||||
// adasProvider.setBasicInfo()
|
||||
// );//getUnreadCount()执行的任务
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user