From 76f113de786de389abc21bdf934f841cc0ec1d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A4=AA=E7=99=BD?= <36808766+ghhccghk@users.noreply.github.com> Date: Tue, 21 Jan 2025 15:49:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=84=A6=E7=82=B9=E9=80=9A=E7=9F=A5=E5=8F=8D=E8=89=B2?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=EF=BC=8C=E5=8F=96=E6=B6=88=E5=AF=B9getStatus?= =?UTF-8?q?BarTickerDarkIcon=E8=BF=9B=E8=A1=8C=E7=9D=80=E8=89=B2=20(#231)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 未适配图标的app在焦点通知会以白块显示 * fix: 修复调用方式解决Hyper 1.0 焦点反色失败 * fix: 修复调用方式解决Hyper 1.0 焦点反色失败 * fix: 修复新版本焦点通知反色异常,取消对getStatusBarTickerDarkIcon进行着色 --- .../com/fankes/miui/notify/hook/entity/SystemUIHooker.kt | 6 ++---- 1 file changed, 2 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 511862f..5525c7a 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 @@ -977,9 +977,7 @@ object SystemUIHooker : YukiBaseHooker() { val mIcon = field { name = "mIcon" }.get(instance) if (ConfigData.isEnableModuleLog) YLog.debug("FocusedNotifPromptView DEBUG $isDark ${mIcon.any()}") - /** HyperOS 1.x 旧版本适配 */ - if (miosVersion == "1.0" || miosVersion == "1.1") - mIcon.current()?.superClass()?.method { name = "setColorFilter" }?.call(if (isDark <= 0.5f) Color.WHITE else Color.BLACK) + mIcon.current()?.superClass()?.method { name = "setColorFilter" }?.call(if (isDark <= 0.5f) Color.WHITE else Color.BLACK) } } /** 去他妈的焦点通知彩色图标 */ @@ -996,7 +994,7 @@ object SystemUIHooker : YukiBaseHooker() { ).also { pair -> val originalBitmap = pair.first?.toBitmap() val bitmap = originalBitmap?.let { Bitmap.createScaledBitmap(it, 50, 50, true) } - result = Icon.createWithBitmap(bitmap).apply { if (pair.second) setTint(if (isDark) Color.BLACK else Color.WHITE) } + result = Icon.createWithBitmap(bitmap) } } }