Skip to content

Commit 1a9ce53

Browse files
committed
1 parent 7715258 commit 1a9ce53

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

app/src/main/java/com/lt2333/simplicitytools/hooks/apps/PowerKeeper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ object PowerKeeper : AppRegister() {
1717
lpparam,
1818
LockMaxFpsForAll, //锁定最高刷新率
1919
PreventRecoveryOfBatteryOptimizationWhitelistForS, //防止恢复电池优化白名单
20-
DoNotClearAppForS,//阻止杀后台
20+
DoNotClearAppForT,//阻止杀后台
2121
MakeMilletMoreAggressiveForS,//使 Millet 更激进
2222
CustomRefreshRatepForT,//自定义高刷
2323
)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.lt2333.simplicitytools.hooks.rules.t.powerkeeper
2+
3+
import com.github.kyuubiran.ezxhelper.utils.findMethod
4+
import com.github.kyuubiran.ezxhelper.utils.hookBefore
5+
import com.lt2333.simplicitytools.utils.hasEnable
6+
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
7+
8+
object DoNotClearAppForT : HookRegister() {
9+
override fun init() {
10+
findMethod("miui.process.ProcessManager") {
11+
name == "kill"
12+
}.hookBefore {
13+
hasEnable("do_not_clear_app") {
14+
it.result = false
15+
}
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)