revent:新增允许下滑所有通知变成小窗 (#104)

This commit is contained in:
LittleTurtle2333
2022-03-24 16:58:51 +08:00
parent 61f64ba7bb
commit a4fe68c141
3 changed files with 2 additions and 32 deletions

View File

@@ -903,14 +903,7 @@ class SettingsActivity : MIUIActivity() {
dataBindingRecv = show_weather_main_switch_binding.binding.getRecv(2)
)
)
add(
TextSummaryWithSwitchV(
TextSummaryV(
textId = R.string.can_notification_slide,
),
SwitchV("can_notification_slide")
)
)
add(LineV())
add(TitleTextV(resId = R.string.control_center))

View File

@@ -58,10 +58,8 @@ class SystemUI : IXposedHookLoadPackage {
OldQSCustom().handleLoadPackage(lpparam)
//双排网速
DoubleLineNetworkSpeed().handleLoadPackage(lpparam)
//大移动类型
StatusBarBigMobileTypeIcon().handleLoadPackage(lpparam)
//允许下滑通知打开小窗
CanNotificationSlide().handleLoadPackage(lpparam)
}
}

View File

@@ -1,21 +0,0 @@
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 de.robv.android.xposed.IXposedHookLoadPackage
import de.robv.android.xposed.callbacks.XC_LoadPackage
class CanNotificationSlide : IXposedHookLoadPackage {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
findMethod("com.android.systemui.statusbar.notification.policy.AppMiniWindowManager") {
name == "canNotificationSlide"
}.hookMethod {
after { param ->
hasEnable("can_notification_slide") {
param.result = true
}
}
}
}
}