From ad195d93ea94f1d08f32d707667601f48e99c685 Mon Sep 17 00:00:00 2001 From: NextAlone <12210746+NextAlone@users.noreply.github.com> Date: Thu, 5 May 2022 05:19:49 +0800 Subject: [PATCH] fix: notification summary background --- .../coloros/notify/hook/entity/SystemUIHooker.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 4f87f6f..b167343 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 @@ -715,6 +715,21 @@ class SystemUIHooker : YukiBaseHooker() { beforeHook { modifyNotifyPanelAlpha(args().last().cast()) } } }.by { isOldNotificationBackground.not() } + ExpandableNotificationRowClass.hook { + injectMember { + method { + name = "updateBackgroundForGroupState" + paramCount = 0 + } + beforeHook { + if (prefs.get(DataConst.ENABLE_NOTIFY_PANEL_ALPHA)) { + ExpandableNotificationRowClass.clazz.field { + name = "mShowGroupBackgroundWhenExpanded" + }.get(instance).setTrue() + } + } + } + }.by { isOldNotificationBackground.not() } /** 替换通知面板背景 - 旧版本 */ NotificationBackgroundViewClass.hook { injectMember {