Merge branch 'dev' into dev_1.1.2
This commit is contained in:
@@ -10,6 +10,7 @@ import com.mogo.service.passport.IMogoPassportManager;
|
||||
import com.mogo.service.passport.IMogoTicketCallback;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.account.sdk.AccountClientManager;
|
||||
import com.zhidao.account.sdk.Environment;
|
||||
import com.zhidao.account.sdk.callback.TicketInfoCallback;
|
||||
import com.zhidao.account.sdk.network.NetEnvironManager;
|
||||
|
||||
@@ -27,13 +28,14 @@ class PassportManager implements IMogoPassportManager {
|
||||
|
||||
private static volatile PassportManager sInstance;
|
||||
|
||||
private PassportManager(){}
|
||||
private PassportManager() {
|
||||
}
|
||||
|
||||
@Keep
|
||||
public static PassportManager getInstance(){
|
||||
if( sInstance == null ){
|
||||
synchronized( PassportManager.class ) {
|
||||
if( sInstance == null ){
|
||||
public static PassportManager getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( PassportManager.class ) {
|
||||
if ( sInstance == null ) {
|
||||
sInstance = new PassportManager();
|
||||
}
|
||||
}
|
||||
@@ -41,7 +43,7 @@ class PassportManager implements IMogoPassportManager {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public synchronized void release(){
|
||||
public synchronized void release() {
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
@@ -77,11 +79,25 @@ class PassportManager implements IMogoPassportManager {
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
AccountClientManager.init( context.getApplicationContext(), getNetEnvironment(), NetEnvironManager.OS_2C, "os2.0-launcher" );
|
||||
}
|
||||
|
||||
private Environment getNetEnvironment() {
|
||||
int mode = DebugConfig.getNetMode();
|
||||
if ( mode == DebugConfig.NET_MODE_DEMO ) {
|
||||
// 演示环境用 qa 的
|
||||
mode = DebugConfig.NET_MODE_QA;
|
||||
}
|
||||
AccountClientManager.init( context.getApplicationContext(), mode, NetEnvironManager.OS_2C, "os2.0-launcher" );
|
||||
switch ( mode ) {
|
||||
case DebugConfig.NET_MODE_DEV:
|
||||
return Environment.dev;
|
||||
case DebugConfig.NET_MODE_DEMO:
|
||||
case DebugConfig.NET_MODE_QA:
|
||||
return Environment.qa;
|
||||
case DebugConfig.NET_MODE_RELEASE:
|
||||
default:
|
||||
return Environment.release;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ dependencies {
|
||||
// 长链
|
||||
implementation 'com.zhidao.socket:built-in-socket:1.0.15'
|
||||
// passport
|
||||
implementation 'com.zhidao.tcloginsdk:tclogin:1.1.0'
|
||||
implementation 'com.zhidao.tcloginsdk:tclogin:1.1.3'
|
||||
|
||||
annotationProcessor 'com.elegant.spi:compiler:1.0.3'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user