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

@@ -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 );
}