|
|
@@ -16,6 +16,7 @@ import com.yingyangfly.baselib.net.BaseObserver
|
|
|
import com.yingyangfly.baselib.net.BaselibServiceFactory
|
|
|
import com.yingyangfly.baselib.utils.NetWorkUtils
|
|
|
import com.yingyangfly.baselib.utils.User
|
|
|
+import java.util.concurrent.Executors
|
|
|
|
|
|
class InitService : Service() {
|
|
|
|
|
|
@@ -34,7 +35,9 @@ class InitService : Service() {
|
|
|
|
|
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
|
|
startForeground()
|
|
|
- Thread { init() }.start()
|
|
|
+ Executors.newSingleThreadExecutor().execute {
|
|
|
+ init()
|
|
|
+ }
|
|
|
return super.onStartCommand(intent, flags, startId)
|
|
|
}
|
|
|
|