File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed
taskscheduler/src/main/java/com/silencedut/taskscheduler Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,17 @@ public class TaskScheduler {
3636 private ExecutorService mTimeOutExecutor ;
3737 private Handler mIOHandler ;
3838 private SafeSchedulerHandler mMainHandler = new SafeSchedulerHandler (Looper .getMainLooper ());
39- private ILog mILog ;
39+ private ILog mILog = new ILog () {
40+ @ Override
41+ public void info (String info ) {
42+ Log .i (TAG ,info );
43+ }
44+
45+ @ Override
46+ public void error (String error ) {
47+ Log .e (TAG ,error );
48+ }
49+ };
4050
4151 private static final int CPU_COUNT = Runtime .getRuntime ().availableProcessors ();
4252 private static final int MAXIMUM_POOL_SIZE = CPU_COUNT * 2 + 1 ;
@@ -76,20 +86,7 @@ private TaskScheduler() {
7686 public static void addLogImpl (ILog taskLog ) {
7787 if (taskLog != null ) {
7888 getInstance ().mILog = taskLog ;
79- }else {
80- getInstance ().mILog = new ILog () {
81- @ Override
82- public void info (String info ) {
83- Log .i (TAG ,info );
84- }
85-
86- @ Override
87- public void error (String error ) {
88- Log .e (TAG ,error );
89- }
90- };
9189 }
92-
9390 }
9491
9592 public static ExecutorService executorService () {
You can’t perform that action at this time.
0 commit comments