mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-06 02:35:32 +08:00
Merge code
This commit is contained in:
@@ -630,7 +630,7 @@ class SystemUIHooker : YukiBaseHooker() {
|
|||||||
override fun onHook() {
|
override fun onHook() {
|
||||||
/** 缓存图标数据 */
|
/** 缓存图标数据 */
|
||||||
cachingIconDatas()
|
cachingIconDatas()
|
||||||
/** 执行 Hook */
|
/** 注入 MIUI 自己增加的一个工具类 */
|
||||||
NotificationUtilClass.hook {
|
NotificationUtilClass.hook {
|
||||||
/** 强制回写系统的状态栏图标样式为原生 */
|
/** 强制回写系统的状态栏图标样式为原生 */
|
||||||
injectMember {
|
injectMember {
|
||||||
@@ -673,8 +673,9 @@ class SystemUIHooker : YukiBaseHooker() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/** 注入状态栏通知图标实例 */
|
||||||
StatusBarIconViewClass.hook {
|
StatusBarIconViewClass.hook {
|
||||||
/** Hook 状态栏图标的颜色 */
|
/** Hook 状态栏通知图标的颜色 */
|
||||||
injectMember {
|
injectMember {
|
||||||
method { name = "updateIconColor" }
|
method { name = "updateIconColor" }
|
||||||
afterHook {
|
afterHook {
|
||||||
@@ -718,6 +719,7 @@ class SystemUIHooker : YukiBaseHooker() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/** 注入状态栏通知图标容器实例 */
|
||||||
NotificationIconContainerClass.hook {
|
NotificationIconContainerClass.hook {
|
||||||
injectMember {
|
injectMember {
|
||||||
method { name = "calculateIconTranslations" }
|
method { name = "calculateIconTranslations" }
|
||||||
@@ -756,6 +758,7 @@ class SystemUIHooker : YukiBaseHooker() {
|
|||||||
beforeHook { isShowNotificationIcons = firstArgs<Boolean>() ?: false }
|
beforeHook { isShowNotificationIcons = firstArgs<Boolean>() ?: false }
|
||||||
}.ignoredNoSuchMemberFailure()
|
}.ignoredNoSuchMemberFailure()
|
||||||
}.by { NotificationIconContainerClass.clazz.hasField { name = "MAX_STATIC_ICONS" } }
|
}.by { NotificationIconContainerClass.clazz.hasField { name = "MAX_STATIC_ICONS" } }
|
||||||
|
/** 注入原生通知包装纸实例 */
|
||||||
NotificationHeaderViewWrapperClass.hook {
|
NotificationHeaderViewWrapperClass.hook {
|
||||||
/** 修复下拉通知图标自动设置回 APP 图标的方法 */
|
/** 修复下拉通知图标自动设置回 APP 图标的方法 */
|
||||||
injectMember {
|
injectMember {
|
||||||
@@ -792,6 +795,7 @@ class SystemUIHooker : YukiBaseHooker() {
|
|||||||
}
|
}
|
||||||
/** 修改 MIUI 风格通知栏的通知图标 */
|
/** 修改 MIUI 风格通知栏的通知图标 */
|
||||||
MiuiNotificationViewWrapperClass.hook {
|
MiuiNotificationViewWrapperClass.hook {
|
||||||
|
/** 替换通知小图标 */
|
||||||
injectMember {
|
injectMember {
|
||||||
method { name = "handleAppIcon" }
|
method { name = "handleAppIcon" }
|
||||||
replaceUnit {
|
replaceUnit {
|
||||||
|
Reference in New Issue
Block a user