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