This commit is contained in:
wangcongtao
2020-07-23 17:17:31 +08:00
parent fd72161711
commit 5f2df28a46
3 changed files with 6 additions and 21 deletions

View File

@@ -134,6 +134,11 @@ public class MogoApplication extends AbsMogoApplication {
@Override
public void onError( int code, String msg ) {
Logger.w( TAG, "code = %s, msg = %s", code, msg );
if ( !TextUtils.isEmpty( Utils.getSn() ) ) {
if ( after != null ) {
after.run();
}
}
}
} );
}

View File

@@ -30,7 +30,7 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation rootProject.ext.dependencies.arouter
// 上报位置
implementation 'com.zhidao.locupload:loc-upload-sdk:1.1.1'
implementation 'com.zhidao.locupload:loc-upload-sdk:1.1.2'
// 长链
implementation 'com.zhidao.socket:built-in-socket:1.0.15'
// passport

View File

@@ -4,8 +4,6 @@ import android.content.Context;
import androidx.annotation.Keep;
import com.elegant.spi.annotations.Service;
import com.mogo.base.services.BaseServicesConstants;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.map.location.MogoLocation;
import com.mogo.service.locationinfo.IMogoLocationInfoService;
@@ -13,8 +11,6 @@ import com.mogo.utils.logger.Logger;
import com.zhidao.locupload.LocEnvironment;
import com.zhidao.locupload.LocUploadConfig;
import com.zhidao.locupload.LocUploadManager;
import com.zhidao.locupload.Platform;
import com.zhidao.locupload.location.LocationServiceProvider;
public
/**
@@ -76,25 +72,9 @@ class MogoLocationInfoServices implements IMogoLocationInfoService {
public void init( Context context ) {
LocUploadConfig.instance().
setAppId( DebugConfig.getSocketAppId() ).
setSocketChannelId( BaseServicesConstants.SOCKET_CHANNEL_ID ).
setContext( context.getApplicationContext() ).
setLocEnvironment( getEnvironment() ).
setLoggable( DebugConfig.isDebug() ).
setPlatform( Platform.car ).
setLocInterval( 2000L );
Logger.d( TAG, "sdk - init" );
}
private LocEnvironment getEnvironment() {
switch ( DebugConfig.getNetMode() ) {
case 1:
return LocEnvironment.dev;
case 2:
case 4:
return LocEnvironment.qa;
case 3:
default:
return LocEnvironment.release;
}
}
}