Merge code

This commit is contained in:
2022-04-04 02:31:36 +08:00
parent cced5ded10
commit 6586d7f456
3 changed files with 4 additions and 4 deletions

View File

@@ -155,7 +155,7 @@ class YukiHookXposedProcessor : SymbolProcessorProvider {
}
if ((modulePackageName.startsWith(".") ||
modulePackageName.endsWith(".") ||
!modulePackageName.contains(".") ||
modulePackageName.contains(".").not() ||
modulePackageName.contains("..")) &&
modulePackageName.isNotEmpty()
) error(msg = "Invalid Module Package name \"$modulePackageName\"")

View File

@@ -552,7 +552,7 @@ class YukiHookCreater(private val packageParam: PackageParam, private val hookCl
* @return [Result] 可继续向下监听
*/
fun by(initiate: () -> Boolean): Result {
isDisableMemberRunHook = !(runCatching { initiate() }.getOrNull() ?: false)
isDisableMemberRunHook = (runCatching { initiate() }.getOrNull() ?: false).not()
if (isDisableMemberRunHook) ignoredAllFailure()
return this
}
@@ -660,7 +660,7 @@ class YukiHookCreater(private val packageParam: PackageParam, private val hookCl
* @return [Result] 可继续向下监听
*/
fun by(initiate: () -> Boolean): Result {
isDisableCreaterRunHook = !(runCatching { initiate() }.getOrNull() ?: false)
isDisableCreaterRunHook = (runCatching { initiate() }.getOrNull() ?: false).not()
return this
}

View File

@@ -59,7 +59,7 @@ object YukiHookXposedBridge {
*/
@YukiGenerateApi
val isXposedCallbackSetUp
get() = !isXposedInitialized && packageParamCallback != null
get() = isXposedInitialized.not() && packageParamCallback != null
/**
* 当前 Hook 的对象是模块自身