mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-05 18:25:28 +08:00
Fix some hooking process not always in the correct process problem in YukiXposedModule
This commit is contained in:
@@ -212,13 +212,13 @@ internal object YukiXposedModule : IYukiXposedModuleLifecycle {
|
|||||||
if (isPackageLoaded(packageName, HookEntryType.RESOURCES).not() && packageName == AppParasitics.currentPackageName)
|
if (isPackageLoaded(packageName, HookEntryType.RESOURCES).not() && packageName == AppParasitics.currentPackageName)
|
||||||
assignWrapper(HookEntryType.RESOURCES, packageName, appResources = appResources)
|
assignWrapper(HookEntryType.RESOURCES, packageName, appResources = appResources)
|
||||||
else null
|
else null
|
||||||
}?.also {
|
}?.also { wrapper ->
|
||||||
runCatching {
|
if (wrapper.isCorrectProcess) runCatching {
|
||||||
if (it.isCorrectProcess) packageParamCallback?.invoke(it.instantiate().assign(it).apply { YukiHookAPI.printSplashInfo() })
|
if (wrapper.type != HookEntryType.ZYGOTE && wrapper.packageName == modulePackageName)
|
||||||
if (it.type != HookEntryType.ZYGOTE && it.packageName == modulePackageName)
|
AppParasitics.hookModuleAppRelated(wrapper.appClassLoader, wrapper.type)
|
||||||
AppParasitics.hookModuleAppRelated(it.appClassLoader, it.type)
|
if (wrapper.type == HookEntryType.PACKAGE) AppParasitics.registerToAppLifecycle(wrapper.packageName)
|
||||||
if (it.type == HookEntryType.PACKAGE) AppParasitics.registerToAppLifecycle(it.packageName)
|
if (wrapper.type == HookEntryType.RESOURCES) isSupportResourcesHook = true
|
||||||
if (it.type == HookEntryType.RESOURCES) isSupportResourcesHook = true
|
packageParamCallback?.invoke(wrapper.instantiate().assign(wrapper).apply { YukiHookAPI.printSplashInfo() })
|
||||||
}.onFailure { yLoggerE(msg = "An exception occurred in the Hooking Process of YukiHookAPI", e = it) }
|
}.onFailure { yLoggerE(msg = "An exception occurred in the Hooking Process of YukiHookAPI", e = it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user