mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-06 02:35:40 +08:00
Modify change injectModuleAppResources function code style
This commit is contained in:
@@ -225,12 +225,7 @@ internal object AppParasitics {
|
|||||||
internal fun injectModuleAppResources(hostResources: Resources) {
|
internal fun injectModuleAppResources(hostResources: Resources) {
|
||||||
if (injectedHostResourcesHashCodes.contains(hostResources.hashCode())) return
|
if (injectedHostResourcesHashCodes.contains(hostResources.hashCode())) return
|
||||||
if (YukiHookBridge.hasXposedBridge) runCatching {
|
if (YukiHookBridge.hasXposedBridge) runCatching {
|
||||||
hostResources.assets.current {
|
hostResources.assets.current().method { name = "addAssetPath"; param(StringType) }.call(moduleAppFilePath)
|
||||||
method {
|
|
||||||
name = "addAssetPath"
|
|
||||||
param(StringType)
|
|
||||||
}.call(moduleAppFilePath)
|
|
||||||
}
|
|
||||||
injectedHostResourcesHashCodes.add(hostResources.hashCode())
|
injectedHostResourcesHashCodes.add(hostResources.hashCode())
|
||||||
}.onFailure {
|
}.onFailure {
|
||||||
yLoggerE(msg = "Failed to inject module resources into [$hostResources]", e = it)
|
yLoggerE(msg = "Failed to inject module resources into [$hostResources]", e = it)
|
||||||
|
Reference in New Issue
Block a user