diff --git a/app/src/main/kotlin/star/sky/voyager/activity/pages/sub/LockScreenPage.kt b/app/src/main/kotlin/star/sky/voyager/activity/pages/sub/LockScreenPage.kt
index f2cf659a..9db49a51 100644
--- a/app/src/main/kotlin/star/sky/voyager/activity/pages/sub/LockScreenPage.kt
+++ b/app/src/main/kotlin/star/sky/voyager/activity/pages/sub/LockScreenPage.kt
@@ -1,7 +1,7 @@
package star.sky.voyager.activity.pages.sub
import android.view.View
-import cn.fkj233.ui.activity.MIUIActivity
+import cn.fkj233.ui.activity.MIUIActivity.Companion.safeSP
import cn.fkj233.ui.activity.annotation.BMPage
import cn.fkj233.ui.activity.data.BasePage
import cn.fkj233.ui.activity.view.SeekBarWithTextV
@@ -50,6 +50,10 @@ class LockScreenPage : BasePage() {
tipsId = R.string.only_official_default_themes_are_supported
), SwitchV("remove_lock_screen_camera")
)
+ TextSummaryWithSwitch(
+ TextSummaryV(textId = R.string.lock_screen_zen_mode),
+ SwitchV("lock_screen_zen_mode")
+ )
TextSummaryWithSwitch(
TextSummaryV(textId = R.string.enable_wave_charge_animation),
SwitchV("enable_wave_charge_animation")
@@ -61,7 +65,7 @@ class LockScreenPage : BasePage() {
), SwitchV("lock_screen_charging_current")
)
val chargingInfo = GetDataBinding({
- MIUIActivity.safeSP.getBoolean(
+ safeSP.getBoolean(
"lockscreen_charging_info",
false
)
diff --git a/app/src/main/kotlin/star/sky/voyager/hook/apps/SystemUI.kt b/app/src/main/kotlin/star/sky/voyager/hook/apps/SystemUI.kt
index b36851c5..39818fde 100644
--- a/app/src/main/kotlin/star/sky/voyager/hook/apps/SystemUI.kt
+++ b/app/src/main/kotlin/star/sky/voyager/hook/apps/SystemUI.kt
@@ -22,6 +22,7 @@ import star.sky.voyager.hook.hooks.systemui.LockScreenClockDisplaySeconds
import star.sky.voyager.hook.hooks.systemui.LockScreenCurrent
import star.sky.voyager.hook.hooks.systemui.LockScreenDoubleTapToSleep
import star.sky.voyager.hook.hooks.systemui.LockScreenFont
+import star.sky.voyager.hook.hooks.systemui.LockScreenZenMode
import star.sky.voyager.hook.hooks.systemui.LockscreenChargingInfo
import star.sky.voyager.hook.hooks.systemui.MaximumNumberOfNotificationIcons
import star.sky.voyager.hook.hooks.systemui.MonetTheme
@@ -83,6 +84,7 @@ object SystemUI : AppRegister() {
WaveCharge, // 启用Alpha充电动画
LockScreenCurrent, // 充电时显示当前电流
LockScreenDoubleTapToSleep, // 锁屏-双击锁定屏幕
+ LockScreenZenMode, // 隐藏锁屏界面的勿扰模式通知
NoPasswordHook, // 开机免输密码
OldQSCustom, // 自定义行列数
// 状态栏网络速度 Start
diff --git a/app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/LockScreenZenMode.kt b/app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/LockScreenZenMode.kt
new file mode 100644
index 00000000..d4829cb2
--- /dev/null
+++ b/app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/LockScreenZenMode.kt
@@ -0,0 +1,17 @@
+package star.sky.voyager.hook.hooks.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 star.sky.voyager.utils.init.HookRegister
+import star.sky.voyager.utils.key.hasEnable
+
+object LockScreenZenMode : HookRegister() {
+ override fun init() = hasEnable("lock_screen_zen_mode") {
+ loadClass("com.android.systemui.statusbar.notification.zen.ZenModeViewController").methodFinder()
+ .filterByName("shouldBeVisible")
+ .first().createHook {
+ returnConstant(false)
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/values-ja-rJP/strings.xml b/app/src/main/res/values-ja-rJP/strings.xml
index 9df3049d..9bef06e9 100644
--- a/app/src/main/res/values-ja-rJP/strings.xml
+++ b/app/src/main/res/values-ja-rJP/strings.xml
@@ -601,6 +601,7 @@
ボタンをぼかす
ロックスクリーンから -1 画面の機能を削除
ロックスクリーンのカメラ機能を削除
+ ロック画面での勿扰モード通知の非表示
Alpha 充電アニメーションを有効にする
充電時に現在の電流を表示
電流単位は mA を使用
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 075b8ed5..29c3148c 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -601,6 +601,7 @@
模糊按钮
移除锁屏负一屏功能
移除锁屏相机功能
+ 隐藏锁屏界面的勿扰模式通知
启用 Alpha 充电动画
充电时显示当前电流
电流单位使用 mA
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index cd6830a4..63a7c881 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -603,6 +603,7 @@
Blur button
Remove the lock screen side panel
Remove the lock screen camera feature
+ Hide Zen Mode notification on lock screen
Enable wave charge animation
Display current information during charging
The current unit uses mA