mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-04 09:45:34 +08:00
Fix notification panel icon reset by system problem in SystemUIHooker
This commit is contained in:
@@ -852,15 +852,21 @@ object SystemUIHooker : YukiBaseHooker() {
|
|||||||
}.also { nf ->
|
}.also { nf ->
|
||||||
nf?.notification?.also {
|
nf?.notification?.also {
|
||||||
it.smallIcon.loadDrawable(context)?.also { iconDrawable ->
|
it.smallIcon.loadDrawable(context)?.also { iconDrawable ->
|
||||||
compatNotifyIcon(
|
/** 执行替换 */
|
||||||
context = context,
|
fun doParse() {
|
||||||
nf = nf,
|
compatNotifyIcon(
|
||||||
isGrayscaleIcon = isGrayscaleIcon(context, iconDrawable),
|
context = context,
|
||||||
packageName = context.packageName,
|
nf = nf,
|
||||||
drawable = iconDrawable,
|
isGrayscaleIcon = isGrayscaleIcon(context, iconDrawable),
|
||||||
iconColor = it.color,
|
packageName = context.packageName,
|
||||||
iconView = this
|
drawable = iconDrawable,
|
||||||
)
|
iconColor = it.color,
|
||||||
|
iconView = this
|
||||||
|
)
|
||||||
|
}
|
||||||
|
doParse()
|
||||||
|
/** 延迟重新设置防止部分机型的系统重新设置图标出现图标着色后黑白块问题 */
|
||||||
|
delayedRun(ms = 1500) { doParse() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user