Skip to content

Commit 0a451fb

Browse files
authored
opt UnlockHotseatIcon (#959)
1 parent cfc06aa commit 0a451fb

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/UnlockHotseatIcon.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,10 @@
1818
*/
1919
package com.sevtinge.hyperceiler.module.hook.home
2020

21-
import com.sevtinge.hyperceiler.utils.*
21+
import com.sevtinge.hyperceiler.module.base.tool.HookTool.MethodHook.*
2222

2323
class UnlockHotseatIcon : HomeBaseHook() {
2424
override fun init() {
25-
DEVICE_CONFIG.hookBeforeMethod(
26-
if (isNewHome) "calHotseatMaxCount" else "getHotseatMaxCount"
27-
) {
28-
it.result = 99
29-
}
25+
findAndHookMethod(DEVICE_CONFIG, "getHotseatMaxCount", returnConstant(99))
3026
}
3127
}

0 commit comments

Comments
 (0)