Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.lt2333.simplicitytools.hooks.rules.all.powerkeeper.LockMaxFpsForAll
import com.lt2333.simplicitytools.hooks.rules.s.powerkeeper.DoNotClearAppForS
import com.lt2333.simplicitytools.hooks.rules.s.powerkeeper.MakeMilletMoreAggressiveForS
import com.lt2333.simplicitytools.hooks.rules.s.powerkeeper.PreventRecoveryOfBatteryOptimizationWhitelistForS
import com.lt2333.simplicitytools.hooks.rules.t.powerkeeper.DoNotClearAppForT
import com.lt2333.simplicitytools.utils.xposed.base.AppRegister
import de.robv.android.xposed.callbacks.XC_LoadPackage

Expand All @@ -18,7 +19,7 @@ object PowerKeeper : AppRegister() {
lpparam,
LockMaxFpsForAll, //锁定最高刷新率
PreventRecoveryOfBatteryOptimizationWhitelistForS, //防止恢复电池优化白名单
DoNotClearAppForS,//阻止杀后台
DoNotClearAppForT,//阻止杀后台
MakeMilletMoreAggressiveForS,//使 Millet 更激进
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.lt2333.simplicitytools.hooks.rules.t.powerkeeper

import com.github.kyuubiran.ezxhelper.utils.findMethod
import com.github.kyuubiran.ezxhelper.utils.hookBefore
import com.lt2333.simplicitytools.utils.hasEnable
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister

object DoNotClearAppForT : HookRegister() {
override fun init() {
findMethod("miui.process.ProcessManager") {
name == "kill"
}.hookBefore {
hasEnable("do_not_clear_app") {
it.result = false
}
}
}
}