mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 12:05:30 +00:00
Update libsu and dependencies
This commit is contained in:
parent
eb400f19b1
commit
cfd1e0cf22
@ -80,7 +80,7 @@ dependencies {
|
|||||||
implementation("dev.rikka.rikkax.recyclerview:recyclerview-ktx:1.3.2")
|
implementation("dev.rikka.rikkax.recyclerview:recyclerview-ktx:1.3.2")
|
||||||
implementation("io.noties.markwon:core:4.6.2")
|
implementation("io.noties.markwon:core:4.6.2")
|
||||||
|
|
||||||
val vLibsu = "5.2.2"
|
val vLibsu = "5.3.0"
|
||||||
implementation("com.github.topjohnwu.libsu:core:${vLibsu}")
|
implementation("com.github.topjohnwu.libsu:core:${vLibsu}")
|
||||||
implementation("com.github.topjohnwu.libsu:service:${vLibsu}")
|
implementation("com.github.topjohnwu.libsu:service:${vLibsu}")
|
||||||
implementation("com.github.topjohnwu.libsu:nio:${vLibsu}")
|
implementation("com.github.topjohnwu.libsu:nio:${vLibsu}")
|
||||||
@ -110,9 +110,9 @@ dependencies {
|
|||||||
|
|
||||||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||||||
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
||||||
implementation("androidx.appcompat:appcompat:1.6.1")
|
implementation("androidx.appcompat:appcompat:1.7.0")
|
||||||
implementation("androidx.recyclerview:recyclerview:1.3.2")
|
implementation("androidx.recyclerview:recyclerview:1.3.2")
|
||||||
implementation("androidx.fragment:fragment-ktx:1.7.1")
|
implementation("androidx.fragment:fragment-ktx:1.8.0")
|
||||||
implementation("androidx.transition:transition:1.5.0")
|
implementation("androidx.transition:transition:1.5.0")
|
||||||
implementation("androidx.core:core-ktx:1.13.1")
|
implementation("androidx.core:core-ktx:1.13.1")
|
||||||
implementation("androidx.core:core-splashscreen:1.0.1")
|
implementation("androidx.core:core-splashscreen:1.0.1")
|
||||||
|
@ -10,7 +10,6 @@ import androidx.profileinstaller.ProfileInstaller
|
|||||||
import com.topjohnwu.magisk.BuildConfig
|
import com.topjohnwu.magisk.BuildConfig
|
||||||
import com.topjohnwu.magisk.StubApk
|
import com.topjohnwu.magisk.StubApk
|
||||||
import com.topjohnwu.magisk.core.di.ServiceLocator
|
import com.topjohnwu.magisk.core.di.ServiceLocator
|
||||||
import com.topjohnwu.magisk.core.utils.DispatcherExecutor
|
|
||||||
import com.topjohnwu.magisk.core.utils.NetworkObserver
|
import com.topjohnwu.magisk.core.utils.NetworkObserver
|
||||||
import com.topjohnwu.magisk.core.utils.ProcessLifecycle
|
import com.topjohnwu.magisk.core.utils.ProcessLifecycle
|
||||||
import com.topjohnwu.magisk.core.utils.RootUtils
|
import com.topjohnwu.magisk.core.utils.RootUtils
|
||||||
@ -24,6 +23,7 @@ import com.topjohnwu.superuser.internal.UiThreadHandler
|
|||||||
import com.topjohnwu.superuser.ipc.RootService
|
import com.topjohnwu.superuser.ipc.RootService
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
|
import kotlinx.coroutines.asExecutor
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import java.lang.ref.WeakReference
|
import java.lang.ref.WeakReference
|
||||||
@ -73,7 +73,7 @@ open class App() : Application() {
|
|||||||
.setInitializers(ShellInit::class.java)
|
.setInitializers(ShellInit::class.java)
|
||||||
.setContext(base)
|
.setContext(base)
|
||||||
.setTimeout(2))
|
.setTimeout(2))
|
||||||
Shell.EXECUTOR = DispatcherExecutor(Dispatchers.IO)
|
Shell.EXECUTOR = Dispatchers.IO.asExecutor()
|
||||||
RootUtils.bindTask = RootService.bindOrTask(
|
RootUtils.bindTask = RootService.bindOrTask(
|
||||||
intent<RootUtils>(),
|
intent<RootUtils>(),
|
||||||
UiThreadHandler.executor,
|
UiThreadHandler.executor,
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
package com.topjohnwu.magisk.core.utils
|
|
||||||
|
|
||||||
import kotlinx.coroutines.CoroutineDispatcher
|
|
||||||
import kotlinx.coroutines.CoroutineScope
|
|
||||||
import kotlinx.coroutines.Runnable
|
|
||||||
import kotlinx.coroutines.SupervisorJob
|
|
||||||
import kotlinx.coroutines.launch
|
|
||||||
import java.util.concurrent.AbstractExecutorService
|
|
||||||
import java.util.concurrent.CountDownLatch
|
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
|
|
||||||
class DispatcherExecutor(dispatcher: CoroutineDispatcher) : AbstractExecutorService() {
|
|
||||||
|
|
||||||
private val job = SupervisorJob()
|
|
||||||
private val scope = CoroutineScope(job + dispatcher)
|
|
||||||
private val latch = CountDownLatch(1)
|
|
||||||
|
|
||||||
init {
|
|
||||||
job.invokeOnCompletion { latch.countDown() }
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun execute(command: Runnable) {
|
|
||||||
scope.launch {
|
|
||||||
command.run()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun shutdown() = job.cancel()
|
|
||||||
|
|
||||||
override fun shutdownNow(): List<Runnable> {
|
|
||||||
job.cancel()
|
|
||||||
return emptyList()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun isShutdown() = job.isCancelled
|
|
||||||
|
|
||||||
override fun isTerminated() = job.isCancelled && job.isCompleted
|
|
||||||
|
|
||||||
override fun awaitTermination(timeout: Long, unit: TimeUnit) = latch.await(timeout, unit)
|
|
||||||
}
|
|
@ -17,7 +17,7 @@ gradlePlugin {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(embeddedKotlin("gradle-plugin"))
|
implementation(embeddedKotlin("gradle-plugin"))
|
||||||
implementation("com.android.tools.build:gradle:8.4.1")
|
implementation("com.android.tools.build:gradle:8.5.0")
|
||||||
implementation("androidx.navigation:navigation-safe-args-gradle-plugin:2.7.7")
|
implementation("androidx.navigation:navigation-safe-args-gradle-plugin:2.7.7")
|
||||||
implementation("org.lsposed.lsparanoid:gradle-plugin:0.5.2")
|
implementation("org.lsposed.lsparanoid:gradle-plugin:0.5.2")
|
||||||
implementation("org.eclipse.jgit:org.eclipse.jgit:6.7.0.202309050840-r")
|
implementation("org.eclipse.jgit:org.eclipse.jgit:6.7.0.202309050840-r")
|
||||||
|
Loading…
Reference in New Issue
Block a user