mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-14 12:21:18 +08:00
@@ -745,6 +745,13 @@ class SettingsActivity : MIUIActivity() {
|
||||
SwitchV("notification_weather_city"),
|
||||
dataBindingRecv = showWeatherMainSwitchBinding.binding.getRecv(2)
|
||||
)
|
||||
TextSummaryWithSwitch(
|
||||
TextSummaryV(
|
||||
textId = R.string.can_notification_slide,
|
||||
tipsId = R.string.can_notification_slide_summary,
|
||||
),
|
||||
SwitchV("can_notification_slide"),
|
||||
)
|
||||
Line()
|
||||
TitleText(resId = R.string.control_center)
|
||||
val controlCenterWeatherBinding = GetDataBinding(object : DefValue {
|
||||
|
||||
@@ -41,6 +41,7 @@ object SystemUI: AppRegister() {
|
||||
StatusBarBigMobileTypeIcon, //大移动类型
|
||||
BatteryPercentage, //电量百分比
|
||||
CustomMobileTypeText, //自定义移动类型文本
|
||||
CanNotificationSlide, //允许下滑通知打开小窗
|
||||
LockScreenClockDisplaySeconds, // 锁屏时钟显示秒
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.lt2333.simplicitytools.hook.app.systemui
|
||||
|
||||
import com.github.kyuubiran.ezxhelper.utils.findMethod
|
||||
import com.github.kyuubiran.ezxhelper.utils.hookMethod
|
||||
import com.lt2333.simplicitytools.util.hasEnable
|
||||
import com.lt2333.simplicitytools.util.xposed.base.HookRegister
|
||||
|
||||
object CanNotificationSlide: HookRegister() {
|
||||
|
||||
override fun init() {
|
||||
findMethod("com.android.systemui.statusbar.notification.NotificationSettingsManager") {
|
||||
name == "canSlide"
|
||||
}.hookMethod {
|
||||
after { param ->
|
||||
hasEnable("can_notification_slide") {
|
||||
param.result = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user