From 76b1cc2f0bf685f9e8a713894d2d1e9c2e7d0a2e Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Sun, 14 May 2023 15:51:36 +0800 Subject: [PATCH] Fix notification icon problem in MIUI 14 DEV version in SystemUIHooker --- .../com/fankes/miui/notify/hook/entity/SystemUIHooker.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 5751474..c17bb87 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 @@ -752,9 +752,9 @@ object SystemUIHooker : YukiBaseHooker() { /** 强制回写系统的状态栏图标样式为原生 */ injectMember { method { - name = "shouldSubstituteSmallIcon" - param(ExpandedNotificationClass) - } + name { it == "shouldSubstituteSmallIcon" || it == "shouldSubstituteSmallIconForStatusBarNotification" } + param { it[0] extends StatusBarNotificationClass } + }.all() replaceToFalse() } /** 强制回写系统的状态栏图标样式为原生 */ @@ -762,7 +762,7 @@ object SystemUIHooker : YukiBaseHooker() { var isUseLegacy = false method { name = "getSmallIcon" - param(ExpandedNotificationClass, IntType) + param { it[0] extends StatusBarNotificationClass && it[1] == IntType } }.remedys { method { name = "getSmallIcon"