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

This commit is contained in:
YifePlayte
2022-03-23 14:10:02 +08:00
committed by GitHub
parent 509fef5e06
commit bfff5cc446
4 changed files with 32 additions and 0 deletions

View File

@@ -60,6 +60,8 @@ class SystemUI : IXposedHookLoadPackage {
DoubleLineNetworkSpeed().handleLoadPackage(lpparam)
StatusBarBigMobileTypeIcon().handleLoadPackage(lpparam)
//允许下滑通知打开小窗
CanNotificationSlide().handleLoadPackage(lpparam)
}
}

View File

@@ -0,0 +1,21 @@
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
}
}
}
}
}