opt adas callback

This commit is contained in:
tongchenfei
2021-01-26 18:47:22 +08:00
parent 49874015aa
commit 41a1c60718
2 changed files with 5 additions and 11 deletions

View File

@@ -34,13 +34,8 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
private final SlidePanelView.OnSlidePanelMoveToEndListener onSlideToEndListener = () -> {
// 此处做一个代理,处理一下共有情况
// 判断一下当前是否可以自动驾驶
if (MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus() != IMogoAdasOCHCallback.STATUS_AUTOPILOT_DISABLE) {
hideSlidePanel();
hideNotice();
if (getSlidePanelOnEndListener() != null) {
getSlidePanelOnEndListener().moveToEnd();
}
if (getSlidePanelOnEndListener() != null) {
getSlidePanelOnEndListener().moveToEnd();
}
};
@@ -73,9 +68,6 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
checkCallView(MogoApisHandler.getInstance().getApis().getStatusManagerApi().isCallViewShow());
MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("Och", StatusDescriptor.CALL_VIEW, callViewListener);
if (MogoApisHandler.getInstance().getApis().getAdasControllerApi().getAutopilotStatus() == IMogoAdasOCHCallback.STATUS_AUTOPILOT_DISABLE) {
hideAutopilotBiz();
}
}
private void checkCallView(boolean isShown) {

View File

@@ -354,7 +354,9 @@ public class MogoADASController implements IMogoADASController {
@Override
public void notifyAutopilotState(AdasAIDLAutopilotStateModel autopilotStateModel) {
if (mAdasOCHCallback != null) {
mAdasOCHCallback.onStateChanged(autopilotStateModel.getState(), autopilotStateModel.getReason());
}
}
};
AutopilotServiceManage.getInstance().registerAutopilotDataListener( mAutopolitDataCallBack );