mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 01:35:17 +08:00
Modify add global exception catch for Xposed entry method and change some exception note in YukiHookBridge, YukiBridgeFactory
This commit is contained in:
@@ -35,6 +35,7 @@ import com.highcapable.yukihookapi.annotation.YukiGenerateApi
|
||||
import com.highcapable.yukihookapi.hook.factory.classOf
|
||||
import com.highcapable.yukihookapi.hook.factory.field
|
||||
import com.highcapable.yukihookapi.hook.factory.hasClass
|
||||
import com.highcapable.yukihookapi.hook.log.yLoggerE
|
||||
import com.highcapable.yukihookapi.hook.param.PackageParam
|
||||
import com.highcapable.yukihookapi.hook.param.type.HookEntryType
|
||||
import com.highcapable.yukihookapi.hook.param.wrapper.PackageParamWrapper
|
||||
@@ -263,11 +264,13 @@ object YukiHookBridge {
|
||||
else null
|
||||
else -> null
|
||||
}?.also {
|
||||
if (it.isCorrectProcess) YukiHookAPI.onXposedLoaded(it)
|
||||
if (it.type != HookEntryType.ZYGOTE && it.packageName == modulePackageName)
|
||||
AppParasitics.hookModuleAppRelated(it.appClassLoader, it.type)
|
||||
if (it.type == HookEntryType.PACKAGE) AppParasitics.registerToAppLifecycle(it.packageName)
|
||||
if (it.type == HookEntryType.RESOURCES) isSupportResourcesHook = true
|
||||
runCatching {
|
||||
if (it.isCorrectProcess) YukiHookAPI.onXposedLoaded(it)
|
||||
if (it.type != HookEntryType.ZYGOTE && it.packageName == modulePackageName)
|
||||
AppParasitics.hookModuleAppRelated(it.appClassLoader, it.type)
|
||||
if (it.type == HookEntryType.PACKAGE) AppParasitics.registerToAppLifecycle(it.packageName)
|
||||
if (it.type == HookEntryType.RESOURCES) isSupportResourcesHook = true
|
||||
}.onFailure { yLoggerE(msg = "An exception occurred in the Hooking Process of YukiHookAPI", e = it) }
|
||||
}
|
||||
}
|
||||
}
|
@@ -91,7 +91,7 @@ internal object YukiHookHelper {
|
||||
else -> error("Unexpected BaseFinder result interface type")
|
||||
}
|
||||
hookMember(member, callback)
|
||||
}.onFailure { yLoggerE(msg = "Hooking Process exception occurred", e = it) }.getOrNull() ?: Pair(null, false)
|
||||
}.onFailure { yLoggerE(msg = "An exception occurred when hooking internal function", e = it) }.getOrNull() ?: Pair(null, false)
|
||||
|
||||
/**
|
||||
* Hook [Member]
|
||||
|
Reference in New Issue
Block a user