This commit is contained in:
wangcongtao
2020-02-21 15:47:56 +08:00
parent d481cf1c70
commit 80fa4a292b
2 changed files with 10 additions and 3 deletions

View File

@@ -193,13 +193,14 @@ public class MogoServiceProvider implements IMogoModuleProvider,
@Override
public void onSuccess() {
mLoopRequest = false;
Logger.d(TAG, "request Success.");
Logger.d( TAG, "request Success." );
invokeAutoRefreshStrategy();
}
@Override
public void onFail() {
if ( mLoopRequest ) {
Logger.d( TAG, "onFail and loop" );
mHandler.sendEmptyMessageDelayed( ServiceConst.MSG_LOOP_REQUEST, ServiceConst.LOOP_INTERVAL );
} else {
invokeAutoRefreshStrategy();
@@ -504,8 +505,6 @@ public class MogoServiceProvider implements IMogoModuleProvider,
return;
}
Logger.d( TAG, "onLocationChanged = %s", location );
// 自动刷新触发
final MogoLatLng point = new MogoLatLng( location.getLatitude(), location.getLongitude() );
if ( mLastAutoRefreshLocation == null ) {

View File

@@ -77,6 +77,14 @@ public class RefreshModel {
}
}
@Override
public void onError( Throwable e ) {
super.onError( e );
if (callback != null) {
callback.onFail();
}
}
@Override
public void onError(String message, int code) {
super.onError(message, code);