[taxi/bus-d 270] taxi/bus 自动驾驶动画bug修复
This commit is contained in:
@@ -448,8 +448,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() { //未启动成功做处理
|
||||
if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState()
|
||||
!= IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING && isAnimateRunning){
|
||||
if (isAnimateRunning){// 只判断动画是否在进行,根据自动驾驶当前状态去设置自动驾驶状态
|
||||
stopAutopilotAnimation();
|
||||
updateAutopilotStatus(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState());
|
||||
}
|
||||
@@ -460,7 +459,7 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
/**
|
||||
* 停止自动驾驶中间动画
|
||||
*/
|
||||
private void stopAutopilotAnimation() {
|
||||
protected void stopAutopilotAnimation() {
|
||||
if (autopilotLoadingAnimator != null) {
|
||||
autopilotLoadingAnimator.end();
|
||||
ctvAutopilotStatusIv.clearAnimation();
|
||||
|
||||
@@ -253,6 +253,9 @@ public class BusFragment extends BaseBusTabFragment<BusFragment, BusPresenter>
|
||||
@Override
|
||||
public void moveToEnd() {
|
||||
// 开启自动驾驶到下一站
|
||||
if (isAnimateRunning){
|
||||
stopAutopilotAnimation();
|
||||
}
|
||||
mPresenter.autoDriveToNextStation(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -401,10 +401,16 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() { //未启动成功10s后做处理
|
||||
if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState()
|
||||
!= IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING && isStarting){
|
||||
startAutopilotDone(false);
|
||||
if (isStarting){ //判断动画是否在进行
|
||||
//并且根据状态来设置自动驾驶启动成功还是失败
|
||||
if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState()
|
||||
== IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
|
||||
startAutopilotDone(true);
|
||||
}else {
|
||||
startAutopilotDone(false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},TIMER_START_AUTOPILOT_INTERVAL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user