@@ -43,6 +43,7 @@ import com.fankes.coloros.notify.hook.HookConst.ENABLE_MODULE_LOG
4343import com.fankes.coloros.notify.hook.HookConst.ENABLE_NOTIFY_ICON_FIX
4444import com.fankes.coloros.notify.hook.HookConst.REMOVE_CHANGECP_NOTIFY
4545import com.fankes.coloros.notify.hook.HookConst.REMOVE_DEV_NOTIFY
46+ import com.fankes.coloros.notify.hook.HookConst.REMOVE_DNDALERT_NOTIFY
4647import com.fankes.coloros.notify.ui.base.BaseActivity
4748import com.fankes.coloros.notify.utils.factory.*
4849import com.fankes.coloros.notify.utils.tool.SystemUITool
@@ -98,6 +99,7 @@ class MainActivity : BaseActivity() {
9899 val notifyIconConfigItem = findViewById<View >(R .id.config_item_notify)
99100 val devNotifyConfigSwitch = findViewById<SwitchCompat >(R .id.remove_dev_n_enable_switch)
100101 val crcpNotifyConfigSwitch = findViewById<SwitchCompat >(R .id.remove_chargecp_n_enable_switch)
102+ val dndNotifyConfigSwitch = findViewById<SwitchCompat >(R .id.remove_dndalert_n_enable_switch)
101103 val a12StyleConfigSwitch = findViewById<SwitchCompat >(R .id.a12_style_enable_switch)
102104 val hideIconInLauncherSwitch = findViewById<SwitchCompat >(R .id.hide_icon_in_launcher_switch)
103105 val notifyIconFixSwitch = findViewById<SwitchCompat >(R .id.notify_icon_fix_switch)
@@ -110,6 +112,7 @@ class MainActivity : BaseActivity() {
110112 notifyIconFixButton.isVisible = modulePrefs.getBoolean(ENABLE_NOTIFY_ICON_FIX , default = true )
111113 devNotifyConfigSwitch.isChecked = modulePrefs.getBoolean(REMOVE_DEV_NOTIFY , default = true )
112114 crcpNotifyConfigSwitch.isChecked = modulePrefs.getBoolean(REMOVE_CHANGECP_NOTIFY , default = false )
115+ dndNotifyConfigSwitch.isChecked = modulePrefs.getBoolean(REMOVE_DNDALERT_NOTIFY , default = false )
113116 a12StyleConfigSwitch.isChecked = modulePrefs.getBoolean(ENABLE_ANDROID12_STYLE , isUpperOfAndroidS)
114117 moduleEnableSwitch.isChecked = modulePrefs.getBoolean(ENABLE_MODULE , default = true )
115118 moduleEnableLogSwitch.isChecked = modulePrefs.getBoolean(ENABLE_MODULE_LOG , default = false )
@@ -154,6 +157,11 @@ class MainActivity : BaseActivity() {
154157 modulePrefs.putBoolean(REMOVE_CHANGECP_NOTIFY , b)
155158 SystemUITool .showNeedRestartSnake(context = this )
156159 }
160+ dndNotifyConfigSwitch.setOnCheckedChangeListener { btn, b ->
161+ if (! btn.isPressed) return @setOnCheckedChangeListener
162+ modulePrefs.putBoolean(REMOVE_DNDALERT_NOTIFY , b)
163+ SystemUITool .showNeedRestartSnake(context = this )
164+ }
157165 a12StyleConfigSwitch.setOnCheckedChangeListener { btn, b ->
158166 if (! btn.isPressed) return @setOnCheckedChangeListener
159167 modulePrefs.putBoolean(ENABLE_ANDROID12_STYLE , b)
0 commit comments