Merge branch 'qa' into dev_custom_map

This commit is contained in:
wangcongtao
2020-07-01 11:34:02 +08:00
2 changed files with 14 additions and 4 deletions

View File

@@ -465,7 +465,7 @@ public class MogoServices implements IMogoMapListener,
}
break;
case MotionEvent.ACTION_UP:
restartAutoRefreshAtTime( ServiceConst.DEFAULT_AUTO_REFRESH_WHEN_INTERRUPT );
restartAutoRefreshAtTime( ServiceConst.DEFAULT_AUTO_REFRESH_WHEN_INTERRUPT, false );
mThreadHandler.removeMessages( ServiceConst.MSG_LOCK_CAR );
mThreadHandler.sendEmptyMessageDelayed( ServiceConst.MSG_LOCK_CAR, ServiceConst.DEFAULT_AUTO_REFRESH_WHEN_INTERRUPT );
break;
@@ -473,12 +473,19 @@ public class MogoServices implements IMogoMapListener,
}
private void stopAutoRefreshStrategy() {
stopAutoRefreshStrategy(true);
}
private void stopAutoRefreshStrategy(boolean stopOnlineCarRefresh) {
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
Logger.d( TAG, "stop auto refresh strategy" );
mHandler.removeMessages( ServiceConst.MSG_TYPE_REFRESH_DECREASE );
MapMarkerManager.getInstance().stopAutoRefresh();
if ( stopOnlineCarRefresh ) {
Logger.d( TAG, "stop online car auto refresh" );
MapMarkerManager.getInstance().stopAutoRefresh();
}
}
@Override
@@ -740,11 +747,15 @@ public class MogoServices implements IMogoMapListener,
}
public void restartAutoRefreshAtTime( long time ) {
restartAutoRefreshAtTime( time, true );
}
private void restartAutoRefreshAtTime( long time, boolean stopOnlineCarRefresh ) {
if ( time < 0 ) {
Logger.w( TAG, "ignore refresh request case time < 0" );
return;
}
stopAutoRefreshStrategy();
stopAutoRefreshStrategy(stopOnlineCarRefresh);
mRefreshRemainingTime = time;
long delay = ServiceConst.DECREASE_INTERVAL;
if ( mRefreshRemainingTime < ServiceConst.DECREASE_INTERVAL ) {

View File

@@ -829,7 +829,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
}
}
if ( points.size() >= 1 ) {
points.add( new MogoLatLng( markerLocation.getLat(), markerLocation.getLon() ) );
iMogoMarker.startSmooth( points, SMOOTH_DURATION );
} else {
Logger.d( TAG, "静止小车,但是有相同的连续坐标" );