opt
This commit is contained in:
@@ -63,6 +63,7 @@ import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
|
||||
@@ -272,8 +273,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
};
|
||||
|
||||
private HandlerThread mHandlerThread;
|
||||
|
||||
private Handler mThreadHandler;
|
||||
|
||||
public void init( Context context ) {
|
||||
@@ -330,12 +329,11 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
|
||||
private void initWorkThread() {
|
||||
mHandlerThread = new HandlerThread( "mogo-handler-thread" );
|
||||
mHandlerThread.start();
|
||||
mThreadHandler = new Handler( mHandlerThread.getLooper() ) {
|
||||
mThreadHandler = new Handler( WorkThreadHandler.getInstance().getLooper() ) {
|
||||
@Override
|
||||
public void handleMessage( Message msg ) {
|
||||
super.handleMessage( msg );
|
||||
Logger.d( TAG, "current thread: %s", Thread.currentThread() );
|
||||
if ( msg.what == ServiceConst.MSG_MAP_CHANGED ) {
|
||||
if ( msg.obj instanceof RefreshObject ) {
|
||||
RefreshObject ro = ( ( RefreshObject ) msg.obj );
|
||||
|
||||
@@ -85,7 +85,7 @@ public class ServiceConst {
|
||||
/**
|
||||
* 30 s
|
||||
*/
|
||||
public static final int DEFAULT_AUTO_REFRESH_WHEN_INTERRUPT = 30 * 1_000;
|
||||
public static final int DEFAULT_AUTO_REFRESH_WHEN_INTERRUPT = 20 * 1_000;
|
||||
|
||||
/**
|
||||
* 所有卡片显示的每类点的最大数据量
|
||||
|
||||
Reference in New Issue
Block a user