-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90845fc
commit 111eef8
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
app/src/main/kotlin/star/sky/voyager/hook/hooks/home/ShowAllApp.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package star.sky.voyager.hook.hooks.home | ||
|
||
import com.github.kyuubiran.ezxhelper.EzXHelper.classLoader | ||
import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook | ||
import star.sky.voyager.utils.init.HookRegister | ||
import star.sky.voyager.utils.key.hasEnable | ||
import star.sky.voyager.utils.yife.DexKit.dexKitBridge | ||
import star.sky.voyager.utils.yife.DexKit.loadDexKit | ||
|
||
object ShowAllApp : HookRegister() { | ||
override fun init() = hasEnable("show_all_app_dsm") { | ||
loadDexKit() | ||
dexKitBridge.findMethod { | ||
methodName = "isHideAppValid" | ||
methodReturnType = "boolean" | ||
}.map { | ||
it.getMethodInstance(classLoader).createHook { | ||
returnConstant(true) | ||
} | ||
} | ||
} | ||
} |