From 788d4605ebafe71f3c5c4568945225f136ef9365 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Fri, 1 Jul 2022 00:13:38 +0800 Subject: [PATCH] Revert "Fix MIUI style notification hook failed when SystemUI not Re-optimize" This reverts commit b986c2df1814a6b3c630cbbf77b6d69dde79b659. --- .../com/fankes/miui/notify/hook/entity/SystemUIHooker.kt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/fankes/miui/notify/hook/entity/SystemUIHooker.kt b/app/src/main/java/com/fankes/miui/notify/hook/entity/SystemUIHooker.kt index 4457623..2395351 100644 --- a/app/src/main/java/com/fankes/miui/notify/hook/entity/SystemUIHooker.kt +++ b/app/src/main/java/com/fankes/miui/notify/hook/entity/SystemUIHooker.kt @@ -824,15 +824,10 @@ object SystemUIHooker : YukiBaseHooker() { } /** 修改 MIUI 风格通知栏的通知图标 */ MiuiNotificationViewWrapperClass.hook { - /** 干掉设置通知小图标 */ + /** 替换通知小图标 */ injectMember { method { name = "handleAppIcon" } - intercept() - } - /** 替换 MIUI 通知小图标 */ - injectMember { - method { name = "onContentUpdated" } - afterHook { + replaceUnit { field { name = "mAppIcon" }.get(instance).cast()?.clone { compatNotifyIcon( context = context,