Fix some class not found problem on ColorOS 11 in SystemUIHooker

This commit is contained in:
2023-02-07 02:20:15 +08:00
parent e5a2edb614
commit bad773cc2c

View File

@@ -630,7 +630,7 @@ object SystemUIHooker : YukiBaseHooker() {
DndAlertHelperClass.hook { DndAlertHelperClass.hook {
injectMember { injectMember {
method { method {
name = "sendNotificationWithEndtime" name { it.lowercase() == "sendnotificationwithendtime" }
param(LongType) param(LongType)
} }
beforeHook { beforeHook {
@@ -748,7 +748,7 @@ object SystemUIHooker : YukiBaseHooker() {
} }
beforeHook { modifyNotifyPanelAlpha(instance(), args().last().cast<Drawable>()) } beforeHook { modifyNotifyPanelAlpha(instance(), args().last().cast<Drawable>()) }
} }
}.by { isOldNotificationBackground.not() } }.ignoredHookClassNotFoundFailure().by { isOldNotificationBackground.not() }
/** 替换通知面板背景 - 旧版本 */ /** 替换通知面板背景 - 旧版本 */
NotificationBackgroundViewClass.hook { NotificationBackgroundViewClass.hook {
injectMember { injectMember {
@@ -764,7 +764,7 @@ object SystemUIHooker : YukiBaseHooker() {
paramCount = 2 paramCount = 2
} }
beforeHook { modifyNotifyPanelAlpha(instance(), args().last().cast<Drawable>()) } beforeHook { modifyNotifyPanelAlpha(instance(), args().last().cast<Drawable>()) }
} }.ignoredNoSuchMemberFailure()
}.by { isOldNotificationBackground } }.by { isOldNotificationBackground }
/** 替换通知面板背景 - 避免折叠展开通知二次修改通知面板背景 */ /** 替换通知面板背景 - 避免折叠展开通知二次修改通知面板背景 */
ExpandableNotificationRowClass.hook { ExpandableNotificationRowClass.hook {