mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 09:45:19 +08:00
Modify change function name onHookLogMsg to onDebuggingMsg in MemberBaseFinder
This commit is contained in:
@@ -139,10 +139,10 @@ abstract class MemberBaseFinder internal constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook 过程中开启了 [YukiHookAPI.Configs.isDebug] 输出调试信息
|
||||
* 在开启 [YukiHookAPI.Configs.isDebug] 且在 [YukiHookBridge.hasXposedBridge] 且在 Hook 过程中情况下输出调试信息
|
||||
* @param msg 调试日志内容
|
||||
*/
|
||||
internal fun onHookLogMsg(msg: String) {
|
||||
internal fun onDebuggingMsg(msg: String) {
|
||||
if (YukiHookAPI.Configs.isDebug && YukiHookBridge.hasXposedBridge && hookInstance != null) yLoggerI(msg = msg)
|
||||
}
|
||||
|
||||
|
@@ -202,7 +202,7 @@ class ConstructorFinder @PublishedApi internal constructor(
|
||||
isBindToHooker = isBind
|
||||
setInstance(isBind, result)
|
||||
}.result { ms ->
|
||||
memberInstances.takeIf { it.isNotEmpty() }?.forEach { onHookLogMsg(msg = "Find Constructor [$it] takes ${ms}ms [${hookTag}]") }
|
||||
memberInstances.takeIf { it.isNotEmpty() }?.forEach { onDebuggingMsg(msg = "Find Constructor [$it] takes ${ms}ms [${hookTag}]") }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,13 +266,13 @@ class ConstructorFinder @PublishedApi internal constructor(
|
||||
setInstance(isBindToHooker, it.first.result)
|
||||
}.result { ms ->
|
||||
memberInstances.takeIf { it.isNotEmpty() }
|
||||
?.forEach { onHookLogMsg(msg = "Find Constructor [$it] takes ${ms}ms [${hookTag}]") }
|
||||
?.forEach { onDebuggingMsg(msg = "Find Constructor [$it] takes ${ms}ms [${hookTag}]") }
|
||||
}
|
||||
isFindSuccess = true
|
||||
it.second.onFindCallback?.invoke(memberInstances.constructors())
|
||||
remedyPlansCallback?.invoke()
|
||||
memberInstances.takeIf { it.isNotEmpty() }
|
||||
?.forEach { onHookLogMsg(msg = "Constructor [$it] trying ${p + 1} times success by RemedyPlan [${hookTag}]") }
|
||||
?.forEach { onDebuggingMsg(msg = "Constructor [$it] trying ${p + 1} times success by RemedyPlan [${hookTag}]") }
|
||||
return@run
|
||||
}.onFailure {
|
||||
lastError = it
|
||||
|
@@ -194,7 +194,7 @@ class FieldFinder @PublishedApi internal constructor(
|
||||
runBlocking {
|
||||
setInstance(result)
|
||||
}.result { ms ->
|
||||
memberInstances.takeIf { it.isNotEmpty() }?.forEach { onHookLogMsg(msg = "Find Field [$it] takes ${ms}ms [${hookTag}]") }
|
||||
memberInstances.takeIf { it.isNotEmpty() }?.forEach { onDebuggingMsg(msg = "Find Field [$it] takes ${ms}ms [${hookTag}]") }
|
||||
}
|
||||
Result()
|
||||
} else Result(isNoSuch = true, Throwable("classSet is null"))
|
||||
@@ -245,13 +245,13 @@ class FieldFinder @PublishedApi internal constructor(
|
||||
setInstance(it.first.result)
|
||||
}.result { ms ->
|
||||
memberInstances.takeIf { it.isNotEmpty() }
|
||||
?.forEach { onHookLogMsg(msg = "Find Field [$it] takes ${ms}ms [${hookTag}]") }
|
||||
?.forEach { onDebuggingMsg(msg = "Find Field [$it] takes ${ms}ms [${hookTag}]") }
|
||||
}
|
||||
isFindSuccess = true
|
||||
it.second.onFindCallback?.invoke(memberInstances.fields())
|
||||
remedyPlansCallback?.invoke()
|
||||
memberInstances.takeIf { it.isNotEmpty() }
|
||||
?.forEach { onHookLogMsg(msg = "Field [$it] trying ${p + 1} times success by RemedyPlan [${hookTag}]") }
|
||||
?.forEach { onDebuggingMsg(msg = "Field [$it] trying ${p + 1} times success by RemedyPlan [${hookTag}]") }
|
||||
return@run
|
||||
}.onFailure {
|
||||
lastError = it
|
||||
|
@@ -274,7 +274,7 @@ class MethodFinder @PublishedApi internal constructor(
|
||||
isBindToHooker = isBind
|
||||
setInstance(isBind, result)
|
||||
}.result { ms ->
|
||||
memberInstances.takeIf { it.isNotEmpty() }?.forEach { onHookLogMsg(msg = "Find Method [$it] takes ${ms}ms [${hookTag}]") }
|
||||
memberInstances.takeIf { it.isNotEmpty() }?.forEach { onDebuggingMsg(msg = "Find Method [$it] takes ${ms}ms [${hookTag}]") }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,13 +339,13 @@ class MethodFinder @PublishedApi internal constructor(
|
||||
setInstance(isBindToHooker, it.first.result)
|
||||
}.result { ms ->
|
||||
memberInstances.takeIf { it.isNotEmpty() }
|
||||
?.forEach { onHookLogMsg(msg = "Find Method [$it] takes ${ms}ms [${hookTag}]") }
|
||||
?.forEach { onDebuggingMsg(msg = "Find Method [$it] takes ${ms}ms [${hookTag}]") }
|
||||
}
|
||||
isFindSuccess = true
|
||||
it.second.onFindCallback?.invoke(memberInstances.methods())
|
||||
remedyPlansCallback?.invoke()
|
||||
memberInstances.takeIf { it.isNotEmpty() }
|
||||
?.forEach { onHookLogMsg(msg = "Method [$it] trying ${p + 1} times success by RemedyPlan [${hookTag}]") }
|
||||
?.forEach { onDebuggingMsg(msg = "Method [$it] trying ${p + 1} times success by RemedyPlan [${hookTag}]") }
|
||||
return@run
|
||||
}.onFailure {
|
||||
lastError = it
|
||||
|
Reference in New Issue
Block a user