Skip to content

Commit

Permalink
桌面快捷方式管理显示所有应用
Browse files Browse the repository at this point in the history
  • Loading branch information
hosizoraru committed Jun 14, 2023
1 parent 90845fc commit 111eef8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/main/kotlin/star/sky/voyager/hook/apps/Home.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import star.sky.voyager.hook.hooks.home.RestoreSwitchMinusScreen
import star.sky.voyager.hook.hooks.home.ScrollIconName
import star.sky.voyager.hook.hooks.home.SetDeviceLevel
import star.sky.voyager.hook.hooks.home.ShortcutItemCount
import star.sky.voyager.hook.hooks.home.ShowAllApp
import star.sky.voyager.hook.hooks.home.TaskViewCardSize
import star.sky.voyager.hook.hooks.home.UnlockHotSeatIcon
import star.sky.voyager.hook.hooks.home.UseCompleteBlur
Expand All @@ -48,6 +49,7 @@ object Home : AppRegister() {
DisableRecentViewWallpaperDarkening, // 禁用壁纸压暗效果
RecentViewRemoveCardAnim, // 修改划卡动画
AddFreeformShortcut, // 快捷菜单添加小窗
ShowAllApp, // 桌面快捷方式管理显示所有应用
RestoreGoogleAppIcon, // 恢复Google图标
ScrollIconName, // 滚动显示应用名称
RealMemory, // 后台显示实际使用和总内存
Expand Down
22 changes: 22 additions & 0 deletions app/src/main/kotlin/star/sky/voyager/hook/hooks/home/ShowAllApp.kt
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)
}
}
}
}

0 comments on commit 111eef8

Please sign in to comment.