Modify change injectModuleAppResources function code style

This commit is contained in:
2022-08-15 01:57:06 +08:00
parent cf614eee15
commit 0f5ec1c912

View File

@@ -225,12 +225,7 @@ internal object AppParasitics {
internal fun injectModuleAppResources(hostResources: Resources) {
if (injectedHostResourcesHashCodes.contains(hostResources.hashCode())) return
if (YukiHookBridge.hasXposedBridge) runCatching {
hostResources.assets.current {
method {
name = "addAssetPath"
param(StringType)
}.call(moduleAppFilePath)
}
hostResources.assets.current().method { name = "addAssetPath"; param(StringType) }.call(moduleAppFilePath)
injectedHostResourcesHashCodes.add(hostResources.hashCode())
}.onFailure {
yLoggerE(msg = "Failed to inject module resources into [$hostResources]", e = it)