diff --git a/core/src/main/kotlin/dev/sanmer/mrepo/content/ThrowableWrapper.kt b/core/src/main/kotlin/dev/sanmer/mrepo/content/ThrowableWrapper.kt index 9fb969cf..f1d06668 100644 --- a/core/src/main/kotlin/dev/sanmer/mrepo/content/ThrowableWrapper.kt +++ b/core/src/main/kotlin/dev/sanmer/mrepo/content/ThrowableWrapper.kt @@ -8,6 +8,6 @@ data class ThrowableWrapper( val original: Throwable ) : Parcelable { companion object { - fun Throwable.warp() = ThrowableWrapper(this) + fun Throwable.wrap() = ThrowableWrapper(this) } } diff --git a/core/src/main/kotlin/dev/sanmer/mrepo/impl/APatchModuleManagerImpl.kt b/core/src/main/kotlin/dev/sanmer/mrepo/impl/APatchModuleManagerImpl.kt index fa34aa34..f1af5c6f 100644 --- a/core/src/main/kotlin/dev/sanmer/mrepo/impl/APatchModuleManagerImpl.kt +++ b/core/src/main/kotlin/dev/sanmer/mrepo/impl/APatchModuleManagerImpl.kt @@ -1,7 +1,7 @@ package dev.sanmer.mrepo.impl import dev.sanmer.mrepo.Platform -import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.warp +import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.wrap import dev.sanmer.mrepo.impl.Shell.exec import dev.sanmer.mrepo.stub.IInstallCallback import dev.sanmer.mrepo.stub.IModuleOpsCallback @@ -48,14 +48,14 @@ internal class APatchModuleManagerImpl : BaseModuleManagerImpl() { private fun moduleOps(cmd: String, id: String, callback: IModuleOpsCallback?) { val moduleDir = File(modulesDir, id) if (!moduleDir.exists()) { - callback?.onFailure(id, FileNotFoundException(moduleDir.path).warp()) + callback?.onFailure(id, FileNotFoundException(moduleDir.path).wrap()) return } cmd.exec().onSuccess { callback?.onSuccess(id) }.onFailure { - callback?.onFailure(id, it.warp()) + callback?.onFailure(id, it.wrap()) } } } \ No newline at end of file diff --git a/core/src/main/kotlin/dev/sanmer/mrepo/impl/BaseModuleManagerImpl.kt b/core/src/main/kotlin/dev/sanmer/mrepo/impl/BaseModuleManagerImpl.kt index 240b74b8..9e89d8ee 100644 --- a/core/src/main/kotlin/dev/sanmer/mrepo/impl/BaseModuleManagerImpl.kt +++ b/core/src/main/kotlin/dev/sanmer/mrepo/impl/BaseModuleManagerImpl.kt @@ -2,7 +2,7 @@ package dev.sanmer.mrepo.impl import dev.sanmer.mrepo.content.Module import dev.sanmer.mrepo.content.State -import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.warp +import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.wrap import dev.sanmer.mrepo.impl.Shell.exec import dev.sanmer.mrepo.stub.IInstallCallback import dev.sanmer.mrepo.stub.IModuleManager @@ -148,7 +148,7 @@ internal abstract class BaseModuleManagerImpl : IModuleManager.Stub() { val module = getModuleInfo(path) callback.onSuccess(module) }.onFailure { - callback.onFailure(it.warp()) + callback.onFailure(it.wrap()) } } diff --git a/core/src/main/kotlin/dev/sanmer/mrepo/impl/KernelSUModuleManagerImpl.kt b/core/src/main/kotlin/dev/sanmer/mrepo/impl/KernelSUModuleManagerImpl.kt index 7a3463a3..e9a87464 100644 --- a/core/src/main/kotlin/dev/sanmer/mrepo/impl/KernelSUModuleManagerImpl.kt +++ b/core/src/main/kotlin/dev/sanmer/mrepo/impl/KernelSUModuleManagerImpl.kt @@ -1,7 +1,7 @@ package dev.sanmer.mrepo.impl import dev.sanmer.mrepo.Platform -import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.warp +import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.wrap import dev.sanmer.mrepo.impl.Shell.exec import dev.sanmer.mrepo.stub.IInstallCallback import dev.sanmer.mrepo.stub.IModuleOpsCallback @@ -48,14 +48,14 @@ internal class KernelSUModuleManagerImpl : BaseModuleManagerImpl() { private fun moduleOps(cmd: String, id: String, callback: IModuleOpsCallback?) { val moduleDir = File(modulesDir, id) if (!moduleDir.exists()) { - callback?.onFailure(id, FileNotFoundException(moduleDir.path).warp()) + callback?.onFailure(id, FileNotFoundException(moduleDir.path).wrap()) return } cmd.exec().onSuccess { callback?.onSuccess(id) }.onFailure { - callback?.onFailure(id, it.warp()) + callback?.onFailure(id, it.wrap()) } } } \ No newline at end of file diff --git a/core/src/main/kotlin/dev/sanmer/mrepo/impl/MagiskModuleManagerImpl.kt b/core/src/main/kotlin/dev/sanmer/mrepo/impl/MagiskModuleManagerImpl.kt index 86b42012..18721b7e 100644 --- a/core/src/main/kotlin/dev/sanmer/mrepo/impl/MagiskModuleManagerImpl.kt +++ b/core/src/main/kotlin/dev/sanmer/mrepo/impl/MagiskModuleManagerImpl.kt @@ -1,7 +1,7 @@ package dev.sanmer.mrepo.impl import dev.sanmer.mrepo.Platform -import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.warp +import dev.sanmer.mrepo.content.ThrowableWrapper.Companion.wrap import dev.sanmer.mrepo.stub.IInstallCallback import dev.sanmer.mrepo.stub.IModuleOpsCallback import java.io.File @@ -56,7 +56,7 @@ internal class MagiskModuleManagerImpl : BaseModuleManagerImpl() { private fun moduleOps(tags: List, id: String, callback: IModuleOpsCallback?) { val moduleDir = File(modulesDir, id) if (!moduleDir.exists()) { - callback?.onFailure(id, FileNotFoundException(moduleDir.path).warp()) + callback?.onFailure(id, FileNotFoundException(moduleDir.path).wrap()) return } @@ -71,7 +71,7 @@ internal class MagiskModuleManagerImpl : BaseModuleManagerImpl() { }.onSuccess { callback?.onSuccess(id) }.onFailure { - callback?.onFailure(id, it.warp()) + callback?.onFailure(id, it.wrap()) } }