|
|
@ -16,13 +16,9 @@ abstract class BaseService : Service(), CoroutineScope by MainScope() { |
|
|
|
scope: CoroutineScope = this, |
|
|
|
scope: CoroutineScope = this, |
|
|
|
context: CoroutineContext = Dispatchers.IO, |
|
|
|
context: CoroutineContext = Dispatchers.IO, |
|
|
|
block: suspend CoroutineScope.() -> T |
|
|
|
block: suspend CoroutineScope.() -> T |
|
|
|
): Coroutine<T> { |
|
|
|
) = Coroutine.async(scope, context) { block() } |
|
|
|
return Coroutine.async(scope, context) { block() } |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun onBind(intent: Intent?): IBinder? { |
|
|
|
override fun onBind(intent: Intent?) = null |
|
|
|
return null |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun onDestroy() { |
|
|
|
override fun onDestroy() { |
|
|
|
super.onDestroy() |
|
|
|
super.onDestroy() |
|
|
|