opt
This commit is contained in:
@@ -18,7 +18,7 @@ public
|
|||||||
@Keep
|
@Keep
|
||||||
class MogoLocationInfoServices implements IMogoLocationInfoService {
|
class MogoLocationInfoServices implements IMogoLocationInfoService {
|
||||||
|
|
||||||
private static final String TAG = "MogoLocationInfoServices";
|
private static final String TAG = "MogoLocationInfoServices-apk";
|
||||||
|
|
||||||
private static volatile MogoLocationInfoServices sInstance;
|
private static volatile MogoLocationInfoServices sInstance;
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,13 @@ package com.mogo.base.services.passport;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.Keep;
|
||||||
|
|
||||||
import com.mogo.commons.debug.DebugConfig;
|
import com.mogo.commons.debug.DebugConfig;
|
||||||
import com.mogo.commons.storage.SpStorage;
|
import com.mogo.commons.storage.SpStorage;
|
||||||
import com.mogo.service.passport.IMogoPassportManager;
|
import com.mogo.service.passport.IMogoPassportManager;
|
||||||
import com.mogo.service.passport.IMogoTicketCallback;
|
import com.mogo.service.passport.IMogoTicketCallback;
|
||||||
|
import com.mogo.utils.logger.Logger;
|
||||||
import com.zhidao.account.sdk.AccountClientManager;
|
import com.zhidao.account.sdk.AccountClientManager;
|
||||||
import com.zhidao.account.sdk.callback.TicketInfoCallback;
|
import com.zhidao.account.sdk.callback.TicketInfoCallback;
|
||||||
import com.zhidao.account.sdk.network.NetEnvironManager;
|
import com.zhidao.account.sdk.network.NetEnvironManager;
|
||||||
@@ -17,14 +20,16 @@ public
|
|||||||
*
|
*
|
||||||
* 描述
|
* 描述
|
||||||
*/
|
*/
|
||||||
|
@Keep
|
||||||
class PassportManager implements IMogoPassportManager {
|
class PassportManager implements IMogoPassportManager {
|
||||||
|
|
||||||
private static final String TAG = "PassportManager";
|
private static final String TAG = "PassportManager-apk";
|
||||||
|
|
||||||
private static volatile PassportManager sInstance;
|
private static volatile PassportManager sInstance;
|
||||||
|
|
||||||
private PassportManager(){}
|
private PassportManager(){}
|
||||||
|
|
||||||
|
@Keep
|
||||||
public static PassportManager getInstance(){
|
public static PassportManager getInstance(){
|
||||||
if( sInstance == null ){
|
if( sInstance == null ){
|
||||||
synchronized( PassportManager.class ) {
|
synchronized( PassportManager.class ) {
|
||||||
@@ -45,6 +50,7 @@ class PassportManager implements IMogoPassportManager {
|
|||||||
getTicket( new TicketInfoCallback() {
|
getTicket( new TicketInfoCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess( String ticket ) {
|
public void onSuccess( String ticket ) {
|
||||||
|
Logger.d( TAG, "success" );
|
||||||
SpStorage.setTicket( ticket );
|
SpStorage.setTicket( ticket );
|
||||||
if ( callback != null ) {
|
if ( callback != null ) {
|
||||||
callback.onSuccess( ticket );
|
callback.onSuccess( ticket );
|
||||||
@@ -53,6 +59,7 @@ class PassportManager implements IMogoPassportManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure( int code, String msg ) {
|
public void onFailure( int code, String msg ) {
|
||||||
|
Logger.d( TAG, "fail" );
|
||||||
if ( callback != null ) {
|
if ( callback != null ) {
|
||||||
callback.onError( code, msg );
|
callback.onError( code, msg );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.mogo.base.services.socket;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.Keep;
|
||||||
|
|
||||||
import com.google.protobuf.ByteString;
|
import com.google.protobuf.ByteString;
|
||||||
import com.google.protobuf.InvalidProtocolBufferException;
|
import com.google.protobuf.InvalidProtocolBufferException;
|
||||||
import com.mogo.service.connection.IMogoMsgAckListener;
|
import com.mogo.service.connection.IMogoMsgAckListener;
|
||||||
@@ -29,10 +31,10 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
* <p>
|
* <p>
|
||||||
* 长链实现:基于 netty
|
* 长链实现:基于 netty
|
||||||
*/
|
*/
|
||||||
|
@Keep
|
||||||
public class SocketManager implements IMogoSocketManager, OnSocketReceiveCallback, OnSocketAckCallback {
|
public class SocketManager implements IMogoSocketManager, OnSocketReceiveCallback, OnSocketAckCallback {
|
||||||
|
|
||||||
private static final String TAG = "SocketManager";
|
private static final String TAG = "SocketManager-apk";
|
||||||
|
|
||||||
public static final int MSG_PRODUCT_LINE = MogoCommon.Product.mogoBussiness_VALUE;
|
public static final int MSG_PRODUCT_LINE = MogoCommon.Product.mogoBussiness_VALUE;
|
||||||
private static final int MSG_HEADER_TYPE = MogoConnsvr.MsgType.mogoMsgTypeDispatchSvrNoRspReq_VALUE;
|
private static final int MSG_HEADER_TYPE = MogoConnsvr.MsgType.mogoMsgTypeDispatchSvrNoRspReq_VALUE;
|
||||||
@@ -45,6 +47,7 @@ public class SocketManager implements IMogoSocketManager, OnSocketReceiveCallbac
|
|||||||
mSocketConnManager.addSocketAckCallback( this );
|
mSocketConnManager.addSocketAckCallback( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Keep
|
||||||
public static SocketManager getInstance( Context context ) {
|
public static SocketManager getInstance( Context context ) {
|
||||||
if ( sInstance == null ) {
|
if ( sInstance == null ) {
|
||||||
synchronized ( SocketManager.class ) {
|
synchronized ( SocketManager.class ) {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.mogo.base.services.locationinfo;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.Keep;
|
||||||
|
|
||||||
import com.elegant.spi.annotations.Service;
|
import com.elegant.spi.annotations.Service;
|
||||||
import com.mogo.commons.debug.DebugConfig;
|
import com.mogo.commons.debug.DebugConfig;
|
||||||
import com.mogo.map.location.MogoLocation;
|
import com.mogo.map.location.MogoLocation;
|
||||||
@@ -20,9 +22,10 @@ public
|
|||||||
*
|
*
|
||||||
* 位置服务
|
* 位置服务
|
||||||
*/
|
*/
|
||||||
|
@Keep
|
||||||
class MogoLocationInfoServices implements IMogoLocationInfoService {
|
class MogoLocationInfoServices implements IMogoLocationInfoService {
|
||||||
|
|
||||||
private static final String TAG = "MogoLocationInfoServices";
|
private static final String TAG = "MogoLocationInfoServices-sdk";
|
||||||
|
|
||||||
private static volatile MogoLocationInfoServices sInstance;
|
private static volatile MogoLocationInfoServices sInstance;
|
||||||
private MogoLocation mLocation;
|
private MogoLocation mLocation;
|
||||||
@@ -30,6 +33,7 @@ class MogoLocationInfoServices implements IMogoLocationInfoService {
|
|||||||
private MogoLocationInfoServices() {
|
private MogoLocationInfoServices() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Keep
|
||||||
public static MogoLocationInfoServices getInstance() {
|
public static MogoLocationInfoServices getInstance() {
|
||||||
if ( sInstance == null ) {
|
if ( sInstance == null ) {
|
||||||
synchronized ( MogoLocationInfoServices.class ) {
|
synchronized ( MogoLocationInfoServices.class ) {
|
||||||
|
|||||||
@@ -2,10 +2,13 @@ package com.mogo.base.services.passport;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.Keep;
|
||||||
|
|
||||||
import com.mogo.commons.debug.DebugConfig;
|
import com.mogo.commons.debug.DebugConfig;
|
||||||
import com.mogo.commons.storage.SpStorage;
|
import com.mogo.commons.storage.SpStorage;
|
||||||
import com.mogo.service.passport.IMogoPassportManager;
|
import com.mogo.service.passport.IMogoPassportManager;
|
||||||
import com.mogo.service.passport.IMogoTicketCallback;
|
import com.mogo.service.passport.IMogoTicketCallback;
|
||||||
|
import com.mogo.utils.logger.Logger;
|
||||||
import com.zhidao.accountsdk.manager.CarPadClientManagerImpl;
|
import com.zhidao.accountsdk.manager.CarPadClientManagerImpl;
|
||||||
import com.zhidao.accountsdk.manager.TicketInfoCallback;
|
import com.zhidao.accountsdk.manager.TicketInfoCallback;
|
||||||
import com.zhidao.accountsdk.network.NetEnvironManager;
|
import com.zhidao.accountsdk.network.NetEnvironManager;
|
||||||
@@ -18,15 +21,17 @@ public
|
|||||||
*
|
*
|
||||||
* 描述
|
* 描述
|
||||||
*/
|
*/
|
||||||
|
@Keep
|
||||||
class PassportManager implements IMogoPassportManager {
|
class PassportManager implements IMogoPassportManager {
|
||||||
|
|
||||||
private static final String TAG = "PassportManager";
|
private static final String TAG = "PassportManager-sdk";
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
|
||||||
private static volatile PassportManager sInstance;
|
private static volatile PassportManager sInstance;
|
||||||
|
|
||||||
private PassportManager(){}
|
private PassportManager(){}
|
||||||
|
|
||||||
|
@Keep
|
||||||
public static PassportManager getInstance(){
|
public static PassportManager getInstance(){
|
||||||
if( sInstance == null ){
|
if( sInstance == null ){
|
||||||
synchronized( PassportManager.class ) {
|
synchronized( PassportManager.class ) {
|
||||||
@@ -47,6 +52,7 @@ class PassportManager implements IMogoPassportManager {
|
|||||||
getTicket( new TicketInfoCallback() {
|
getTicket( new TicketInfoCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess( String ticket ) {
|
public void onSuccess( String ticket ) {
|
||||||
|
Logger.d( TAG, "success" );
|
||||||
SpStorage.setTicket( ticket );
|
SpStorage.setTicket( ticket );
|
||||||
if ( callback != null ) {
|
if ( callback != null ) {
|
||||||
callback.onSuccess( ticket );
|
callback.onSuccess( ticket );
|
||||||
@@ -55,6 +61,7 @@ class PassportManager implements IMogoPassportManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure( int code ) {
|
public void onFailure( int code ) {
|
||||||
|
Logger.d( TAG, "fail" );
|
||||||
if ( callback != null ) {
|
if ( callback != null ) {
|
||||||
callback.onError( code, "error." );
|
callback.onError( code, "error." );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.mogo.base.services.socket;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.Keep;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import com.google.protobuf.ByteString;
|
import com.google.protobuf.ByteString;
|
||||||
@@ -20,6 +21,7 @@ import com.zhidao.socket.CallbackManager;
|
|||||||
import com.zhidao.socket.Environment;
|
import com.zhidao.socket.Environment;
|
||||||
import com.zhidao.socket.SocketConfig;
|
import com.zhidao.socket.SocketConfig;
|
||||||
import com.zhidao.socket.SocketMessageDispatcher;
|
import com.zhidao.socket.SocketMessageDispatcher;
|
||||||
|
import com.zhidao.socket.utils.RequestUtil;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -34,16 +36,19 @@ public
|
|||||||
*
|
*
|
||||||
* 长链
|
* 长链
|
||||||
*/
|
*/
|
||||||
|
@Keep
|
||||||
class SocketManager implements IMogoSocketManager, Callback {
|
class SocketManager implements IMogoSocketManager, Callback {
|
||||||
|
|
||||||
private static final String TAG = "SocketManager";
|
private static final String TAG = "SocketManager-sdk";
|
||||||
|
|
||||||
private static volatile SocketManager sInstance;
|
private static volatile SocketManager sInstance;
|
||||||
|
private String mAppId;
|
||||||
|
|
||||||
public SocketManager( Context context ) {
|
public SocketManager( Context context ) {
|
||||||
CallbackManager.getInstance().register( this );
|
CallbackManager.getInstance().register( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Keep
|
||||||
public static SocketManager getInstance( Context context ) {
|
public static SocketManager getInstance( Context context ) {
|
||||||
if ( sInstance == null ) {
|
if ( sInstance == null ) {
|
||||||
synchronized ( SocketManager.class ) {
|
synchronized ( SocketManager.class ) {
|
||||||
@@ -76,6 +81,7 @@ class SocketManager implements IMogoSocketManager, Callback {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init( Context context, String appId ) {
|
public void init( Context context, String appId ) {
|
||||||
|
mAppId = appId;
|
||||||
SocketConfig.instance()
|
SocketConfig.instance()
|
||||||
.setAppContext( context.getApplicationContext() )
|
.setAppContext( context.getApplicationContext() )
|
||||||
.setEnvironment( getEnvironment() )
|
.setEnvironment( getEnvironment() )
|
||||||
@@ -191,24 +197,8 @@ class SocketManager implements IMogoSocketManager, Callback {
|
|||||||
@Override
|
@Override
|
||||||
public void sendMsg( MsgBody body, IMogoMsgAckListener listener ) {
|
public void sendMsg( MsgBody body, IMogoMsgAckListener listener ) {
|
||||||
Logger.d( TAG, "sendMsg." );
|
Logger.d( TAG, "sendMsg." );
|
||||||
// if ( mSocketConnManager != null ) {
|
final byte[] pb = convertToPBBytes( body.getMsgType(), objectToBytes( body.getContent() ) );
|
||||||
// if ( mSocketConnManager.isConnected() ) {
|
RequestUtil.sendPayloadData( mAppId, 2, pb, 1, true, System.currentTimeMillis() );
|
||||||
// Logger.d( TAG, "isConnected." );
|
|
||||||
// final byte[] pb = convertToPBBytes( body.getMsgType(), objectToBytes( body.getContent() ) );
|
|
||||||
// mSocketConnManager.sendPayload(
|
|
||||||
// MSG_PRODUCT_LINE,
|
|
||||||
// pb,
|
|
||||||
// MSG_HEADER_TYPE,
|
|
||||||
// body.isAck(),
|
|
||||||
// body.getMsgId()
|
|
||||||
// );
|
|
||||||
// mAckListeners.put( body.getMsgId(), listener );
|
|
||||||
// } else {
|
|
||||||
// Logger.e( TAG, "sendMsg error, connect is lost." );
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// Logger.e( TAG, "sendMsg error, client is null." );
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] objectToBytes( Object obj ) {
|
public byte[] objectToBytes( Object obj ) {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ MOGO_MODULE_V2X_VERSION=1.2.8
|
|||||||
# 推送
|
# 推送
|
||||||
MOGO_MODULE_PUSH_VERSION=1.1.5.7
|
MOGO_MODULE_PUSH_VERSION=1.1.5.7
|
||||||
MOGO_MODULE_PUSH_BASE_VERSION=1.1.5.5
|
MOGO_MODULE_PUSH_BASE_VERSION=1.1.5.5
|
||||||
MOGO_MODULE_PUSH_NOOP_VERSION=1.1.5.5
|
MOGO_MODULE_PUSH_NOOP_VERSION=1.1.5.6
|
||||||
# 广告资源位
|
# 广告资源位
|
||||||
MOGO_MODULE_AD_CARD_VERSION=1.0.1
|
MOGO_MODULE_AD_CARD_VERSION=1.0.1
|
||||||
# 探路上报和分享模块
|
# 探路上报和分享模块
|
||||||
|
|||||||
Reference in New Issue
Block a user