diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeT.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeT.java index 9c0c617c77..551bce28ea 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeT.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Home/Phone/HomeT.java @@ -106,6 +106,7 @@ import com.sevtinge.hyperceiler.module.hook.home.recent.RemoveCardAnim; import com.sevtinge.hyperceiler.module.hook.home.recent.RemoveIcon; import com.sevtinge.hyperceiler.module.hook.home.recent.RemoveLeftShare; +import com.sevtinge.hyperceiler.module.hook.home.recent.ShowLaunch; import com.sevtinge.hyperceiler.module.hook.home.recent.TaskViewHorizontal; import com.sevtinge.hyperceiler.module.hook.home.recent.TaskViewVertical; import com.sevtinge.hyperceiler.module.hook.home.recent.UnlockPin; @@ -224,6 +225,7 @@ public void handleLoadPackage() { initHook(MemInfoShow.INSTANCE, mPrefsMap.getBoolean("home_recent_show_memory_info") && isPad()); initHook(AlwaysShowCleanUp.INSTANCE, mPrefsMap.getBoolean("always_show_clean_up")); initHook(new BackgroundBlur(), mPrefsMap.getBoolean("home_recent_blur")); + initHook(new ShowLaunch(), mPrefsMap.getBoolean("home_recent_show_launch")); // 图标 initHook(BigIconCorner.INSTANCE, mPrefsMap.getBoolean("home_title_big_icon_corner")); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/recent/ShowLaunch.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/recent/ShowLaunch.java new file mode 100644 index 0000000000..8965588a9d --- /dev/null +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/recent/ShowLaunch.java @@ -0,0 +1,46 @@ +/* + * This file is part of HyperCeiler. + + * HyperCeiler is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + + * Copyright (C) 2023-2024 HyperCeiler Contributions + */ +package com.sevtinge.hyperceiler.module.hook.home.recent; + +import com.sevtinge.hyperceiler.module.base.BaseHook; + +public class ShowLaunch extends BaseHook { + //from XiaomiHelper by HowieHChen + @Override + public void init() throws NoSuchMethodException { + findAndHookMethod("com.miui.home.recents.NavStubView", "changeAlphaScaleForFsGesture", float.class, float.class, new MethodHook(){ + @Override + protected void before(MethodHookParam param) throws Throwable { + param.args[0] = 1.0f; + } + }); + findAndHookMethod("com.miui.home.recents.OverviewState", "getShortcutMenuLayerAlpha", new MethodHook(){ + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(1.0f); + } + }); + findAndHookMethod("com.miui.home.recents.OverviewState", "getShortcutMenuLayerScale", new MethodHook(){ + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult((float) mPrefsMap.getInt("home_recent_show_launch_size", 95) / 100); + } + }); + } +} diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/AppBlurAnim.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/AppBlurAnim.kt index 230ecd5bd6..2ee3df97f5 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/AppBlurAnim.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/AppBlurAnim.kt @@ -1,3 +1,21 @@ +/* + * This file is part of HyperCeiler. + + * HyperCeiler is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + + * Copyright (C) 2023-2024 HyperCeiler Contributions + */ package com.sevtinge.hyperceiler.module.hook.home.title import android.app.* diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index b00c8cedfd..f18daa8eb5 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -1255,6 +1255,8 @@ 展示内存信息 无卡片时不隐藏清理图标 背景模糊 + 最近任务视图不隐藏桌面 + 桌面缩放大小 小部件 强制所有小部件使用动画 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a37df0c2ea..15a7c9d90c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1226,6 +1226,8 @@ Show memory info Prohibit hiding the cleanup icon when there is no card Background blur + Show launcher as background + Launcher background size Widget Widget animation diff --git a/app/src/main/res/xml/home_recent.xml b/app/src/main/res/xml/home_recent.xml index ea6531bef1..2cb5fe3b1b 100644 --- a/app/src/main/res/xml/home_recent.xml +++ b/app/src/main/res/xml/home_recent.xml @@ -13,6 +13,25 @@ android:title="@string/home_recent_blur" android:defaultValue="false" /> + + + + +