add log print logic, opt

This commit is contained in:
wangcongtao
2020-02-10 11:57:37 +08:00
parent 438ae13a4f
commit 56b6f30e75
2 changed files with 10 additions and 0 deletions

View File

@@ -20,6 +20,8 @@ import com.mogo.module.tanlu.constant.TanluConstants;
import com.mogo.module.v2x.V2XConst;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.connection.IMogoSocketManager;
import com.mogo.utils.logger.LogLevel;
import com.mogo.utils.logger.Logger;
//import com.mogo.module.onlinecar.OnLineCarConstants;
@@ -40,6 +42,8 @@ public class MogoApplication extends AbsMogoApplication {
//设置debug模式日志不上传
crashSystem.setDebug(BuildConfig.DEBUG);
Logger.init( BuildConfig.DEBUG ? LogLevel.DEBUG : LogLevel.OFF );
// MogoModulePaths.addModule( new MogoModule( DemoConstants.TAG, "CARD_DEMO" ) );
// MogoModulePaths.addModule( new MogoModule( Demo2Constants.TAG, "CARD_DEMO2" ) );
DebugConfig.setNetMode(BuildConfig.NET_ENV);

View File

@@ -118,8 +118,13 @@ public class MogoServiceProvider implements IMogoModuleProvider,
super.handleMessage( msg );
switch ( msg.what ) {
case ServiceConst.MSG_TYPE_REFRESH_DECREASE:
if ( mStatusManager.isSearchUIShow() ) {
stopAutoRefreshStrategy();
return;
}
mRefreshRemainingTime -= ServiceConst.DECREASE_INTERVAL;
if ( mRefreshRemainingTime == 0 ) {
Logger.d( TAG, "move to center and refresh data." );
mStatusManager.setUserInteractionStatus(ServiceConst.TYPE, true, false );
mUiController.moveToCenter(mLastAutoRefreshLocation);
notifyRefreshData( mLastAutoRefreshLocation, getQueryRadius(), mAutoRefreshCallback );
@@ -366,6 +371,7 @@ public class MogoServiceProvider implements IMogoModuleProvider,
}
private void stopAutoRefreshStrategy() {
Logger.d( TAG, "stop auto refresh strategy" );
mHandler.removeMessages( ServiceConst.MSG_TYPE_REFRESH_DECREASE );
}