mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-06 18:55:37 +08:00
Update YukiHookAPI
This commit is contained in:
@@ -267,11 +267,19 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onHook() = encase {
|
override fun onHook() {
|
||||||
configs {
|
runConfig()
|
||||||
|
runHook()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 配置 Hook */
|
||||||
|
private fun runConfig() = configs {
|
||||||
debugTag = "ColorOSNotify"
|
debugTag = "ColorOSNotify"
|
||||||
isDebug = false
|
isDebug = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 开始 Hook */
|
||||||
|
private fun runHook() = encase {
|
||||||
loadApp(SYSTEMUI_PACKAGE_NAME) {
|
loadApp(SYSTEMUI_PACKAGE_NAME) {
|
||||||
when {
|
when {
|
||||||
/** 不是 ColorOS 系统停止 Hook */
|
/** 不是 ColorOS 系统停止 Hook */
|
||||||
@@ -301,7 +309,11 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
}
|
}
|
||||||
beforeHook {
|
beforeHook {
|
||||||
/** 是否移除 */
|
/** 是否移除 */
|
||||||
if (firstArgs as Int == 7 && prefs.getBoolean(REMOVE_CHANGECP_NOTIFY, default = false)) resultNull()
|
if (firstArgs as Int == 7 && prefs.getBoolean(
|
||||||
|
REMOVE_CHANGECP_NOTIFY,
|
||||||
|
default = false
|
||||||
|
)
|
||||||
|
) resultNull()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user