mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 19:47:38 +00:00
IODispatcherExecutor -> DispatcherExecutor
This commit is contained in:
parent
54e3f1998a
commit
b4120cddfb
@ -7,7 +7,7 @@ import android.content.Context
|
||||
import android.content.res.Configuration
|
||||
import android.os.Bundle
|
||||
import com.topjohnwu.magisk.DynAPK
|
||||
import com.topjohnwu.magisk.core.utils.IODispatcherExecutor
|
||||
import com.topjohnwu.magisk.core.utils.DispatcherExecutor
|
||||
import com.topjohnwu.magisk.core.utils.RootRegistry
|
||||
import com.topjohnwu.magisk.core.utils.ShellInit
|
||||
import com.topjohnwu.magisk.core.utils.updateConfig
|
||||
@ -16,6 +16,7 @@ import com.topjohnwu.magisk.ktx.unwrap
|
||||
import com.topjohnwu.superuser.Shell
|
||||
import com.topjohnwu.superuser.internal.UiThreadHandler
|
||||
import com.topjohnwu.superuser.ipc.RootService
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import timber.log.Timber
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
@ -44,7 +45,7 @@ open class App() : Application() {
|
||||
.setFlags(Shell.FLAG_MOUNT_MASTER)
|
||||
.setInitializers(ShellInit::class.java)
|
||||
.setTimeout(2))
|
||||
Shell.EXECUTOR = IODispatcherExecutor()
|
||||
Shell.EXECUTOR = DispatcherExecutor(Dispatchers.IO)
|
||||
|
||||
// Some context magic
|
||||
val app: Application
|
||||
|
@ -5,10 +5,10 @@ import java.util.concurrent.AbstractExecutorService
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class IODispatcherExecutor : AbstractExecutorService() {
|
||||
class DispatcherExecutor(dispatcher: CoroutineDispatcher) : AbstractExecutorService() {
|
||||
|
||||
private val job = SupervisorJob()
|
||||
private val scope = CoroutineScope(job + Dispatchers.IO)
|
||||
private val scope = CoroutineScope(job + dispatcher)
|
||||
private val latch = CountDownLatch(1)
|
||||
|
||||
init {
|
Loading…
x
Reference in New Issue
Block a user