change the callerlogger
This commit is contained in:
@@ -6,7 +6,7 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.mogo.service.analytics.IMogoAnalytics;
|
||||
@@ -158,7 +158,7 @@ public class MogoServiceApis implements IMogoServiceApis {
|
||||
T newInst = (T) ARouter.getInstance().build(path).navigation();
|
||||
try {
|
||||
SingletonsHolder.registerApi(clazz, newInst);
|
||||
Logger.d(TAG, "keep IProvider instance to SingletonHolder: path = %s", path);
|
||||
CallerLogger.INSTANCE.d(TAG, "keep IProvider instance to SingletonHolder: path = " + path);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ package com.mogo.service.impl.cloud.location;
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.service.cloud.location.IMogoLocationInfoService;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
@@ -17,7 +17,7 @@ public
|
||||
*
|
||||
* 描述
|
||||
*/
|
||||
@Route( path = MogoServicePaths.PATH_LOCATION_INFO )
|
||||
@Route(path = MogoServicePaths.PATH_LOCATION_INFO)
|
||||
class MogoLocationInfoService implements IMogoLocationInfoService {
|
||||
|
||||
private static final String TAG = "MogoLocationInfoService";
|
||||
@@ -25,40 +25,40 @@ class MogoLocationInfoService implements IMogoLocationInfoService {
|
||||
private IMogoLocationInfoService mDelegate;
|
||||
|
||||
@Override
|
||||
public void provideLocation( MogoLocation location ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.provideLocation( location );
|
||||
public void provideLocation(MogoLocation location) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.provideLocation(location);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
public void init(Context context) {
|
||||
|
||||
try {
|
||||
Class< ? > clazz = Class.forName( "com.mogo.aicloud.services.locationinfo.MogoLocationInfoServices" );
|
||||
Method getInstanceMethod = clazz.getMethod( "getInstance" );
|
||||
getInstanceMethod.setAccessible( true );
|
||||
mDelegate = ( IMogoLocationInfoService ) getInstanceMethod.invoke( null );
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "error." );
|
||||
Class<?> clazz = Class.forName("com.mogo.aicloud.services.locationinfo.MogoLocationInfoServices");
|
||||
Method getInstanceMethod = clazz.getMethod("getInstance");
|
||||
getInstanceMethod.setAccessible(true);
|
||||
mDelegate = (IMogoLocationInfoService) getInstanceMethod.invoke(null);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(TAG, "init error : " + e);
|
||||
}
|
||||
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.init( context );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.init(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.service.cloud.passport.IMogoPassportManager;
|
||||
import com.mogo.service.cloud.passport.IMogoTicketCallback;
|
||||
|
||||
@@ -17,7 +17,7 @@ public
|
||||
*
|
||||
* 描述
|
||||
*/
|
||||
@Route( path = MogoServicePaths.PATH_PASSPORT )
|
||||
@Route(path = MogoServicePaths.PATH_PASSPORT)
|
||||
class MogoPassportManager implements IMogoPassportManager {
|
||||
|
||||
private static final String TAG = "MogoPassportManager";
|
||||
@@ -25,24 +25,24 @@ class MogoPassportManager implements IMogoPassportManager {
|
||||
private IMogoPassportManager mDelegate;
|
||||
|
||||
@Override
|
||||
public void requestTicket( IMogoTicketCallback callback ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.requestTicket( callback );
|
||||
public void requestTicket(IMogoTicketCallback callback) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.requestTicket(callback);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
public void init(Context context) {
|
||||
try {
|
||||
Class< ? > clazz = Class.forName( "com.mogo.aicloud.services.passport.PassportManager" );
|
||||
Method getInstanceMethod = clazz.getMethod( "getInstance" );
|
||||
getInstanceMethod.setAccessible( true );
|
||||
mDelegate = ( IMogoPassportManager ) getInstanceMethod.invoke( null );
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "error." );
|
||||
Class<?> clazz = Class.forName("com.mogo.aicloud.services.passport.PassportManager");
|
||||
Method getInstanceMethod = clazz.getMethod("getInstance");
|
||||
getInstanceMethod.setAccessible(true);
|
||||
mDelegate = (IMogoPassportManager) getInstanceMethod.invoke(null);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(TAG, "init error : " + e);
|
||||
}
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.init( context );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.init(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import android.content.Context;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.cloud.socket.entity.MsgBody;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.service.cloud.socket.IMogoLifecycleListener;
|
||||
import com.mogo.service.cloud.socket.IMogoMsgAckListener;
|
||||
import com.mogo.service.cloud.socket.IMogoOnMessageListener;
|
||||
@@ -19,82 +19,82 @@ import java.lang.reflect.Method;
|
||||
* <p>
|
||||
* 长链操作管理
|
||||
*/
|
||||
@Route( path = MogoServicePaths.PATH_SOCKET_MANAGER )
|
||||
@Route(path = MogoServicePaths.PATH_SOCKET_MANAGER)
|
||||
public class MogoSocketManager implements IMogoSocketManager {
|
||||
|
||||
private static final String TAG = "MogoSocketManager";
|
||||
private IMogoSocketManager mDelegate;
|
||||
|
||||
@Override
|
||||
public void init( Context context, String appId ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.init( context, appId );
|
||||
public void init(Context context, String appId) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.init(context, appId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerOnMessageListener( int msgType, IMogoOnMessageListener listener ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.registerOnMessageListener( msgType, listener );
|
||||
public void registerOnMessageListener(int msgType, IMogoOnMessageListener listener) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.registerOnMessageListener(msgType, listener);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterOnMessageListener( int msgType ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.unregisterOnMessageListener( msgType );
|
||||
public void unregisterOnMessageListener(int msgType) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.unregisterOnMessageListener(msgType);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterOnMessageListener( int msgType, IMogoOnMessageListener listener ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.unregisterOnMessageListener( msgType, listener );
|
||||
public void unregisterOnMessageListener(int msgType, IMogoOnMessageListener listener) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.unregisterOnMessageListener(msgType, listener);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerLifecycleListener(int msgType, IMogoLifecycleListener listener) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.registerLifecycleListener( msgType, listener );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.registerLifecycleListener(msgType, listener);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterLifecycleListener(int msgType) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.unregisterLifecycleListener( msgType);
|
||||
if (mDelegate != null) {
|
||||
mDelegate.unregisterLifecycleListener(msgType);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMsg(MsgBody body, IMogoMsgAckListener listener ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.sendMsg( body, listener );
|
||||
public void sendMsg(MsgBody body, IMogoMsgAckListener listener) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.sendMsg(body, listener);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
public void init(Context context) {
|
||||
|
||||
try {
|
||||
Class< ? > clazz = Class.forName( "com.mogo.aicloud.services.socket.MogoAiCloudSocketManager" );
|
||||
Method getInstanceMethod = clazz.getMethod( "getInstance", Context.class );
|
||||
getInstanceMethod.setAccessible( true );
|
||||
mDelegate = ( IMogoSocketManager ) getInstanceMethod.invoke( null, context );
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "error." );
|
||||
Class<?> clazz = Class.forName("com.mogo.aicloud.services.socket.MogoAiCloudSocketManager");
|
||||
Method getInstanceMethod = clazz.getMethod("getInstance", Context.class);
|
||||
getInstanceMethod.setAccessible(true);
|
||||
mDelegate = (IMogoSocketManager) getInstanceMethod.invoke(null, context);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(TAG, "init error : " + e);
|
||||
}
|
||||
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.init( context );
|
||||
if (mDelegate != null) {
|
||||
mDelegate.init(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.mogo.service.impl.cloud.socket;
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.service.cloud.socket.IMogoOnWebSocketMessageListener;
|
||||
import com.mogo.service.cloud.socket.IMogoWebSocketManager;
|
||||
|
||||
@@ -53,7 +53,7 @@ public class MogoWebSocketManager implements IMogoWebSocketManager {
|
||||
getInstanceMethod.setAccessible(true);
|
||||
mDelegate = (IMogoWebSocketManager) getInstanceMethod.invoke(null, context);
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, e, "error.");
|
||||
CallerLogger.INSTANCE.e(TAG, "init error : " + e);
|
||||
}
|
||||
|
||||
if (mDelegate != null) {
|
||||
|
||||
@@ -4,7 +4,6 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.service.fragmentmanager.FragmentDescriptor;
|
||||
import com.mogo.service.fragmentmanager.FragmentStackTransactionListener;
|
||||
|
||||
@@ -24,13 +23,13 @@ public class FragmentStack {
|
||||
|
||||
private static volatile FragmentStack sInstance;
|
||||
|
||||
private Stack< FragmentDescriptor > mFragmentStack = new Stack<>();
|
||||
private final Stack< FragmentDescriptor > mFragmentStack = new Stack<>();
|
||||
private FragmentManager mFragmentManager;
|
||||
private int mContainerId;
|
||||
private FragmentDescriptor mCurrentFragment;
|
||||
|
||||
private FragmentStackTransactionListener mFragmentStackTransactionListener;
|
||||
private List< FragmentStackTransactionListener > mFragmentStackTransactionListeners = new ArrayList<>();
|
||||
private final List< FragmentStackTransactionListener > mFragmentStackTransactionListeners = new ArrayList<>();
|
||||
private int mMessageHistoryContainerId;
|
||||
|
||||
private FragmentStack() {
|
||||
@@ -73,7 +72,6 @@ public class FragmentStack {
|
||||
return;
|
||||
}
|
||||
if ( mFragmentStack.contains( descriptor ) ) {
|
||||
Logger.w( TAG, "fragment has already in stack." );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,8 +68,6 @@ public class GlideImageLoader implements IMogoImageloader {
|
||||
@Override
|
||||
public void displayImage( String url, MogoImageView imageView, int width, int height, final IMogoImageLoaderListener listener ) {
|
||||
|
||||
//Logger.d( TAG, "url = %s", url );
|
||||
|
||||
if ( listener != null ) {
|
||||
listener.onStart();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.statusmanager.IMogoStickyStatusChangedListener;
|
||||
@@ -187,7 +186,6 @@ public class MogoStatusManager implements IMogoStatusManager {
|
||||
|
||||
@Override
|
||||
public void setUserInteractionStatus( String tag, boolean interrupt, boolean callback ) {
|
||||
Logger.d( TAG, "setUserInteractionStatus handler = %s, status = %s, callback = %s", tag, interrupt, callback );
|
||||
mStatus.put( StatusDescriptor.USER_INTERACTED, interrupt );
|
||||
if ( callback ) {
|
||||
invokeStatusChangedListener( StatusDescriptor.USER_INTERACTED, interrupt );
|
||||
@@ -209,14 +207,12 @@ public class MogoStatusManager implements IMogoStatusManager {
|
||||
public void setMainPageResumeStatus( String tag, boolean resume ) {
|
||||
final long start = System.currentTimeMillis();
|
||||
doSetStatus( tag, StatusDescriptor.MAIN_PAGE_RESUME, resume );
|
||||
Logger.i( TAG, "setMainPageResumeStatus " + resume + " cost " + ( System.currentTimeMillis() - start ) + "ms" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMainPageIsBackgroundStatus(String tag, boolean isBackground) {
|
||||
final long start = System.currentTimeMillis();
|
||||
doSetStatus( tag, StatusDescriptor.MAIN_PAGE_IS_BACKGROUND, isBackground );
|
||||
Logger.i( TAG, "setMainPageIsBackgroundStatus " + isBackground + " cost " + ( System.currentTimeMillis() - start ) + "ms" );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user