Skip to content

Commit

Permalink
add log interface for location problem
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenceDut committed Mar 25, 2019
1 parent f5811cf commit fcb047a
Showing 1 changed file with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,17 @@ public class TaskScheduler {
private ExecutorService mTimeOutExecutor ;
private Handler mIOHandler;
private SafeSchedulerHandler mMainHandler = new SafeSchedulerHandler(Looper.getMainLooper());
private ILog mILog;
private ILog mILog = new ILog() {
@Override
public void info(String info) {
Log.i(TAG,info);
}

@Override
public void error(String error) {
Log.e(TAG,error);
}
};

private static final int CPU_COUNT = Runtime.getRuntime().availableProcessors();
private static final int MAXIMUM_POOL_SIZE = CPU_COUNT * 2 + 1;
Expand Down Expand Up @@ -76,20 +86,7 @@ private TaskScheduler() {
public static void addLogImpl(ILog taskLog) {
if(taskLog != null) {
getInstance().mILog = taskLog;
}else {
getInstance().mILog = new ILog() {
@Override
public void info(String info) {
Log.i(TAG,info);
}

@Override
public void error(String error) {
Log.e(TAG,error);
}
};
}

}

public static ExecutorService executorService() {
Expand Down

0 comments on commit fcb047a

Please sign in to comment.