add log print logic, opt
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user