Skip to content

Commit

Permalink
feat: 系统界面-其他-隐藏小窗的小白条(by MaxFreeForm)
Browse files Browse the repository at this point in the history
Signed-off-by: mu7220 <[email protected]>
  • Loading branch information
lingqiqi5211 committed Jan 23, 2024
1 parent c79ee79 commit 1be17bd
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions README_en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions README_pt-BR.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
}
}
}
1 change: 1 addition & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@
<string name="system_ui_disable_bluetooth_restrict">禁用蓝牙临时关闭</string>
<string name="system_ui_disable_miui_multi_win_switch">隐藏快捷窗口按钮</string>
<string name="system_ui_disable_miui_multi_win_switch_desc">隐藏常驻的三个小点,包括小窗顶部和 HyperOS for Pad 横屏顶部中间的按钮 (不影响功能使用)</string>
<string name="system_ui_disable_bottombar">隐藏小窗的小白条</string>
<string name="system_ui_notification_freeform">更多应用通知栏下拉打开小窗</string>
<string name="system_ui_others_pct_title">数据显示</string>
<string name="system_showpct_title">显示亮度百分比</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,7 @@
<string name="system_ui_disable_bluetooth_restrict">Prevent bluetooth from being turned off temporarily</string>
<string name="system_ui_disable_miui_multi_win_switch">Hide the Convenience Window button</string>
<string name="system_ui_disable_miui_multi_win_switch_desc">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)</string>
<string name="system_ui_disable_bottombar">Hide the bottom gesture of the small window</string>
<string name="system_ui_others_pct_title">Data display</string>
<string name="system_showpct_title">Displays the brightness percentage</string>
<string name="system_cc_volume_showpct_title">Displays the percentage of sound</string>
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/xml/system_ui_other.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />

<SwitchPreference
android:defaultValue="false"
android:key="prefs_key_system_ui_disable_bottombar"
android:title="@string/system_ui_disable_bottombar" />

<SwitchPreference
android:defaultValue="false"
android:key="prefs_key_system_ui_disable_bluetooth_restrict"
Expand Down

0 comments on commit 1be17bd

Please sign in to comment.