From bad773cc2ce6bf849d830fb13dfbcee90fa606d4 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Tue, 7 Feb 2023 02:20:15 +0800 Subject: [PATCH] Fix some class not found problem on ColorOS 11 in SystemUIHooker --- .../com/fankes/coloros/notify/hook/entity/SystemUIHooker.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/fankes/coloros/notify/hook/entity/SystemUIHooker.kt b/app/src/main/java/com/fankes/coloros/notify/hook/entity/SystemUIHooker.kt index 24b960c..c9acdb2 100644 --- a/app/src/main/java/com/fankes/coloros/notify/hook/entity/SystemUIHooker.kt +++ b/app/src/main/java/com/fankes/coloros/notify/hook/entity/SystemUIHooker.kt @@ -630,7 +630,7 @@ object SystemUIHooker : YukiBaseHooker() { DndAlertHelperClass.hook { injectMember { method { - name = "sendNotificationWithEndtime" + name { it.lowercase() == "sendnotificationwithendtime" } param(LongType) } beforeHook { @@ -748,7 +748,7 @@ object SystemUIHooker : YukiBaseHooker() { } beforeHook { modifyNotifyPanelAlpha(instance(), args().last().cast()) } } - }.by { isOldNotificationBackground.not() } + }.ignoredHookClassNotFoundFailure().by { isOldNotificationBackground.not() } /** 替换通知面板背景 - 旧版本 */ NotificationBackgroundViewClass.hook { injectMember { @@ -764,7 +764,7 @@ object SystemUIHooker : YukiBaseHooker() { paramCount = 2 } beforeHook { modifyNotifyPanelAlpha(instance(), args().last().cast()) } - } + }.ignoredNoSuchMemberFailure() }.by { isOldNotificationBackground } /** 替换通知面板背景 - 避免折叠展开通知二次修改通知面板背景 */ ExpandableNotificationRowClass.hook {