From 25c07c9c60d6a3769071e4c2d6c38626bcdde32d Mon Sep 17 00:00:00 2001 From: YifePlayte <62252171+YifePlayte@users.noreply.github.com> Date: Tue, 23 Jan 2024 17:13:21 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E7=AA=97=E5=8F=A3=E6=8C=89=E9=92=AE=20?= =?UTF-8?q?=E5=90=8C=E6=A0=B7=E9=80=82=E7=94=A8=E4=BA=8E=E6=89=8B=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/fragment/systemui/SystemUIOtherSettings.java | 6 +++--- app/src/main/res/values-zh-rCN/strings.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/systemui/SystemUIOtherSettings.java b/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/systemui/SystemUIOtherSettings.java index cc7ecc825c..b77d6edd4c 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/systemui/SystemUIOtherSettings.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/systemui/SystemUIOtherSettings.java @@ -28,7 +28,7 @@ public int getContentResId() { @Override public View.OnClickListener addRestartListener() { - return view -> ((BaseSettingsActivity)getActivity()).showRestartDialog( + return view -> ((BaseSettingsActivity) getActivity()).showRestartDialog( getResources().getString(R.string.system_ui), "com.android.systemui" ); @@ -38,10 +38,10 @@ public View.OnClickListener addRestartListener() { public void initPrefs() { mMonetOverlay = findPreference("prefs_key_system_ui_monet"); mDisableBluetoothRestrict = findPreference("prefs_key_system_ui_disable_bluetooth_restrict"); - mMiuiMultiWinSwitch = findPreference("prefs_key_system_ui_disable_miui_multi_win_switch"); + mMiuiMultiWinSwitch = findPreference("prefs_key_system_ui_disable_miui_multi_win_switch"); mMonetOverlay.setVisible(!isAndroidVersion(30)); mDisableBluetoothRestrict.setVisible(isMiuiVersion(14f) && isMoreAndroidVersion(31)); - mMiuiMultiWinSwitch.setVisible(isMoreHyperOSVersion(1f) && isPad()); + mMiuiMultiWinSwitch.setVisible(isMoreHyperOSVersion(1f)); } } diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 507cf29680..8983f27b6a 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -793,7 +793,7 @@ 其他 禁用蓝牙临时关闭 隐藏快捷窗口按钮 - 隐藏 HyperOS for Pad 横屏下顶部居中的快捷窗口按钮 (即常驻的三个小点) + 隐藏 HyperOS 应用窗口顶部居中的快捷窗口按钮 (即常驻的三个小点) 更多应用通知栏下拉打开小窗 数据显示 显示亮度百分比 From 7c207da710ff8763d2e0b507538fd8418a4b058b Mon Sep 17 00:00:00 2001 From: YifePlayte <62252171+YifePlayte@users.noreply.github.com> Date: Tue, 23 Jan 2024 17:16:24 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix=EF=BC=9A=20=E4=BF=AE=E6=AD=A3=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=BA=90=E5=AD=97=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 01e2c4e664..5ae26387c6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -779,7 +779,7 @@ Other Prevent bluetooth from being turned off temporarily Hide the Convenience Window button - Hide the convenient window button centered at the top of the HyperOS for Pad landscape screen + Hide the convenient window button centered at the top of the app windows in HyperOS Data display Displays the brightness percentage Displays the percentage of sound From c79ee799a81820277fa35b7063fc74a5b62494b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=AA=E5=8D=9C=E5=8F=B8=20=C2=B7=20=E6=9F=92=E6=9F=92?= <80700814+mu7220@users.noreply.github.com> Date: Tue, 23 Jan 2024 22:45:42 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=E7=B3=BB=E7=BB=9F=E7=95=8C=E9=9D=A2?= =?UTF-8?q?-=E9=94=81=E5=B1=8F-=E9=9A=90=E8=97=8F=E5=8B=BF=E6=89=B0?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=EF=BC=88by=20hyper=20helper=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mu7220 <80700814+mu7220@users.noreply.github.com> --- .../lockscreen/HideLockscreenZenMode.kt | 26 ++++++++++++++----- app/src/main/res/values-zh-rCN/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/lockscreen/HideLockscreenZenMode.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/lockscreen/HideLockscreenZenMode.kt index 58bfafb07a..941cb5607f 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/lockscreen/HideLockscreenZenMode.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/lockscreen/HideLockscreenZenMode.kt @@ -4,14 +4,28 @@ import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder import com.sevtinge.hyperceiler.module.base.BaseHook +import com.sevtinge.hyperceiler.utils.devicesdk.isMoreHyperOSVersion +import com.sevtinge.hyperceiler.utils.setObjectField object HideLockscreenZenMode : BaseHook() { override fun init() { - loadClass("com.android.systemui.statusbar.notification.zen.ZenModeViewController", lpparam.classLoader) - .methodFinder().first { - name == "shouldBeVisible" - }.createHook { - returnConstant(false) - } + // hyperOS fix by hyper helper + if (isMoreHyperOSVersion(1f)) { + loadClass("com.android.systemui.statusbar.notification.zen.ZenModeViewController", lpparam.classLoader) + .methodFinder().first { + name == "updateVisibility" + }.createHook { + before { + it.thisObject.setObjectField("manuallyDismissed", true) + } + } + } else { + loadClass("com.android.systemui.statusbar.notification.zen.ZenModeViewController", lpparam.classLoader) + .methodFinder().first { + name == "shouldBeVisible" + }.createHook { + returnConstant(false) + } + } } } diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 8983f27b6a..6319f5169c 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -793,7 +793,7 @@ 其他 禁用蓝牙临时关闭 隐藏快捷窗口按钮 - 隐藏 HyperOS 应用窗口顶部居中的快捷窗口按钮 (即常驻的三个小点) + 隐藏常驻的三个小点,包括小窗顶部和 HyperOS for Pad 横屏顶部中间的按钮 (不影响功能使用) 更多应用通知栏下拉打开小窗 数据显示 显示亮度百分比 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5ae26387c6..1f9b80424b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -779,7 +779,7 @@ Other Prevent bluetooth from being turned off temporarily Hide the Convenience Window button - Hide the convenient window button centered at the top of the app windows in HyperOS + Hide the three permanent dots, including the top of the small window and the button in the middle of the top of the HyperOS for Pad horizontal screen (does not affect the use of functions) Data display Displays the brightness percentage Displays the percentage of sound From 1be17bd7f3b90957aa92c78ab5bcefe13727ffd0 Mon Sep 17 00:00:00 2001 From: mu7220 <80700814+mu7220@users.noreply.github.com> Date: Tue, 23 Jan 2024 23:06:45 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=E7=B3=BB=E7=BB=9F=E7=95=8C?= =?UTF-8?q?=E9=9D=A2-=E5=85=B6=E4=BB=96-=E9=9A=90=E8=97=8F=E5=B0=8F?= =?UTF-8?q?=E7=AA=97=E7=9A=84=E5=B0=8F=E7=99=BD=E6=9D=A1=EF=BC=88by=20MaxF?= =?UTF-8?q?reeForm=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mu7220 <80700814+mu7220@users.noreply.github.com> --- README.md | 1 + README_en-US.md | 1 + README_pt-BR.md | 1 + .../hyperceiler/module/app/SystemUI.java | 2 ++ .../module/hook/systemui/DisableBottomBar.kt | 18 ++++++++++++++++++ app/src/main/res/values-zh-rCN/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + app/src/main/res/xml/system_ui_other.xml | 5 +++++ 8 files changed, 30 insertions(+) create mode 100644 app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/DisableBottomBar.kt diff --git a/README.md b/README.md index 87b89ae867..43bca8196d 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,7 @@ HyperCeiler 已停止维护 Android 11-12 的 MIUI ROM,除系统框架、系 - [「FuckNFC」 by xiaowine](https://github.com/xiaowine/FuckNFC) - [「ForegroundPin」 by 焕晨HChen](https://github.com/HChenX/ForegroundPin) - [「Gson」 by Android Open Source Project, Google Inc.](https://github.com/google/gson) +- [「Hyper Helper」 by HowieHChen](https://github.com/HowieHChen/XiaomiHelper) - [「HideMiuiClipboardDialog」 by zerorooot](https://github.com/zerorooot/HideMiuiClipboardDialog) - [「HyperSmartCharge」 by buffcow](https://github.com/buffcow/HyperSmartCharge) - [「Kotlin」 by JetBrains](https://github.com/JetBrains/kotlin) diff --git a/README_en-US.md b/README_en-US.md index 3b7f502cf4..530ca7022e 100644 --- a/README_en-US.md +++ b/README_en-US.md @@ -136,6 +136,7 @@ You can provide translations for the HyperCeiler project [here](https://crwd.in/ - [「FuckNFC」 by xiaowine](https://github.com/xiaowine/FuckNFC) - [「ForegroundPin」 by 焕晨HChen](https://github.com/HChenX/ForegroundPin) - [「Gson」 by Android Open Source Project, Google Inc.](https://github.com/google/gson) +- [「Hyper Helper」 by HowieHChen](https://github.com/HowieHChen/XiaomiHelper) - [「HideMiuiClipboardDialog」 by zerorooot](https://github.com/zerorooot/HideMiuiClipboardDialog) - [「HyperSmartCharge」 by buffcow](https://github.com/buffcow/HyperSmartCharge) - [「Kotlin」 by JetBrains](https://github.com/JetBrains/kotlin) diff --git a/README_pt-BR.md b/README_pt-BR.md index 3a3717a8a6..f05047c346 100644 --- a/README_pt-BR.md +++ b/README_pt-BR.md @@ -136,6 +136,7 @@ Você pode fornecer traduções para o projeto [aqui](https://crwd.in/cemiuiler) - [「FuckNFC」 por xiaowine](https://github.com/xiaowine/FuckNFC) - [「ForegroundPin」 por 焕晨HChen](https://github.com/HChenX/ForegroundPin) - [「Gson」 por Android Open Source Project, Google Inc.](https://github.com/google/gson) +- [「Hyper Helper」 by HowieHChen](https://github.com/HowieHChen/XiaomiHelper) - [「HideMiuiClipboardDialog」 por zerorooot](https://github.com/zerorooot/HideMiuiClipboardDialog) - [「HyperSmartCharge」 por buffcow](https://github.com/buffcow/HyperSmartCharge) - [「Kotlin」 por JetBrains](https://github.com/JetBrains/kotlin) diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI.java index c50d4d759c..042ac01456 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemUI.java @@ -12,6 +12,7 @@ import com.sevtinge.hyperceiler.module.hook.systemui.BluetoothRestrict; import com.sevtinge.hyperceiler.module.hook.systemui.BrightnessPct; import com.sevtinge.hyperceiler.module.hook.systemui.ChargeAnimationStyle; +import com.sevtinge.hyperceiler.module.hook.systemui.DisableBottomBar; import com.sevtinge.hyperceiler.module.hook.systemui.DisableMiuiMultiWinSwitch; import com.sevtinge.hyperceiler.module.hook.systemui.HideNavigationBar; import com.sevtinge.hyperceiler.module.hook.systemui.MonetThemeOverlay; @@ -259,6 +260,7 @@ public void handleLoadPackage() { initHook(new NotificationFix(), mPrefsMap.getBoolean("system_ui_other_notification_fix") && isMoreHyperOSVersion(1f)); initHook(new BrightnessPct(), mPrefsMap.getBoolean("system_showpct_title")); initHook(DisableMiuiMultiWinSwitch.INSTANCE, mPrefsMap.getBoolean("system_ui_disable_miui_multi_win_switch")); + initHook(DisableBottomBar.INSTANCE, mPrefsMap.getBoolean("system_ui_disable_bottombar")); // 锁屏 initHook(new ScramblePIN(), mPrefsMap.getBoolean("system_ui_lock_screen_scramble_pin")); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/DisableBottomBar.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/DisableBottomBar.kt new file mode 100644 index 0000000000..25d06179e8 --- /dev/null +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/DisableBottomBar.kt @@ -0,0 +1,18 @@ +package com.sevtinge.hyperceiler.module.hook.systemui + +import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass +import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook +import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder +import com.sevtinge.hyperceiler.module.base.BaseHook + +object DisableBottomBar : BaseHook() { + override fun init() { + val clazzMiuiBaseWindowDecoration = + loadClass("com.android.wm.shell.miuimultiwinswitch.miuiwindowdecor.MiuiBaseWindowDecoration", lpparam.classLoader) + + clazzMiuiBaseWindowDecoration.methodFinder().filterByName("createBottomCaption").first() + .createHook { + returnConstant(null) + } + } +} diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 6319f5169c..68ae314afc 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -794,6 +794,7 @@ 禁用蓝牙临时关闭 隐藏快捷窗口按钮 隐藏常驻的三个小点,包括小窗顶部和 HyperOS for Pad 横屏顶部中间的按钮 (不影响功能使用) + 隐藏小窗的小白条 更多应用通知栏下拉打开小窗 数据显示 显示亮度百分比 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1f9b80424b..ec1d14dea2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -780,6 +780,7 @@ Prevent bluetooth from being turned off temporarily Hide the Convenience Window button Hide the three permanent dots, including the top of the small window and the button in the middle of the top of the HyperOS for Pad horizontal screen (does not affect the use of functions) + Hide the bottom gesture of the small window Data display Displays the brightness percentage Displays the percentage of sound diff --git a/app/src/main/res/xml/system_ui_other.xml b/app/src/main/res/xml/system_ui_other.xml index 136cd42079..0762c80a9a 100644 --- a/app/src/main/res/xml/system_ui_other.xml +++ b/app/src/main/res/xml/system_ui_other.xml @@ -82,6 +82,11 @@ android:summary="@string/system_ui_disable_miui_multi_win_switch_desc" android:title="@string/system_ui_disable_miui_multi_win_switch" /> + +