Skip to content

Commit 2999d19

Browse files
committed
Revert "Fix some hooking process not always in the correct process problem in YukiXposedModule"
1 parent 8955dac commit 2999d19

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/xposed/bridge/YukiXposedModule.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,13 @@ internal object YukiXposedModule : IYukiXposedModuleLifecycle {
212212
if (isPackageLoaded(packageName, HookEntryType.RESOURCES).not() && packageName == AppParasitics.currentPackageName)
213213
assignWrapper(HookEntryType.RESOURCES, packageName, appResources = appResources)
214214
else null
215-
}?.also { wrapper ->
216-
if (wrapper.isCorrectProcess) runCatching {
217-
if (wrapper.type != HookEntryType.ZYGOTE && wrapper.packageName == modulePackageName)
218-
AppParasitics.hookModuleAppRelated(wrapper.appClassLoader, wrapper.type)
219-
if (wrapper.type == HookEntryType.PACKAGE) AppParasitics.registerToAppLifecycle(wrapper.packageName)
220-
if (wrapper.type == HookEntryType.RESOURCES) isSupportResourcesHook = true
221-
packageParamCallback?.invoke(wrapper.instantiate().assign(wrapper).apply { YukiHookAPI.printSplashInfo() })
215+
}?.also {
216+
runCatching {
217+
if (it.isCorrectProcess) packageParamCallback?.invoke(it.instantiate().assign(it).apply { YukiHookAPI.printSplashInfo() })
218+
if (it.type != HookEntryType.ZYGOTE && it.packageName == modulePackageName)
219+
AppParasitics.hookModuleAppRelated(it.appClassLoader, it.type)
220+
if (it.type == HookEntryType.PACKAGE) AppParasitics.registerToAppLifecycle(it.packageName)
221+
if (it.type == HookEntryType.RESOURCES) isSupportResourcesHook = true
222222
}.onFailure { yLoggerE(msg = "An exception occurred in the Hooking Process of YukiHookAPI", e = it) }
223223
}
224224
}

0 commit comments

Comments
 (0)