diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java index 88aa1860c1..8106fb33e6 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java @@ -173,20 +173,20 @@ public class BusPresenter extends Presenter switch (state) { case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE: if (currentAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) { - - currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE; // 设置UI【自动驾驶】按钮是否展示 runOnUIThread(() -> mView.onAutopilotEnableChange(true)); - - if (FunctionBuildConfig.isDemoMode - && ( - (mCurrentStation >= 0 && mCurrentStation <= mStationList.size() - 1) - && BusOrderModel.getInstance().isGoingToNextStation() - ) - ) { - CallerLogger.INSTANCE.d(M_BUS + "BusOrderModel=", "有美化功能"); - return; - } + } + if (FunctionBuildConfig.isDemoMode + && ( + (mCurrentStation >= 0 && mCurrentStation <= mStationList.size() - 1) + && BusOrderModel.getInstance().isGoingToNextStation() + ) + ) { + CallerLogger.INSTANCE.d(M_BUS + "BusOrderModel=", "有美化功能"); + return; + } + if (currentAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) { + currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE; } // 改变UI自动驾驶状态 runOnUIThread(() -> mView.onAutopilotStatusChanged(currentAutopilotStatus)); @@ -201,19 +201,19 @@ public class BusPresenter extends Presenter runOnUIThread(() -> mView.onAutopilotStatusChanged(currentAutopilotStatus)); break; case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE: + if (FunctionBuildConfig.isDemoMode + && ( + (mCurrentStation >= 0 && mCurrentStation <= mStationList.size() - 1) + && BusOrderModel.getInstance().isGoingToNextStation() + + ) + ) { + CallerLogger.INSTANCE.d(M_BUS + "BusOrderModel=", "有美化功能"); + return; + } + if (currentAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE) { - currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE; - if (FunctionBuildConfig.isDemoMode - && ( - (mCurrentStation >= 0 && mCurrentStation <= mStationList.size() - 1) - && BusOrderModel.getInstance().isGoingToNextStation() - - ) - ) { - CallerLogger.INSTANCE.d(M_BUS + "BusOrderModel=", "有美化功能"); - return; - } } runOnUIThread(() -> { mView.onAutopilotStatusChanged(currentAutopilotStatus);