mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-04 17:55:34 +08:00
修复 MIUI 12 MIPUSH 通知图标问题,修改文案
This commit is contained in:
@@ -19,7 +19,6 @@ Fix the native notification bar icon function abandoned by the MIUI development
|
||||
- 此模块仅支持 LSPosed(作用域“系统界面”)、~~EdXposed(随时停止支持)~~、不支持太极无极
|
||||
- 目前最低支持基于 Android 9 版本的 MIUI 12 或 MIUI 12.5(最低建议)
|
||||
- 请始终保持最新版本的 LSPosed,旧版本可能会出现 Hook 不生效的问题
|
||||
- 在 MIUI 12 上无法对状态栏图标的 MIPUSH 图标进行通知优化适配,下拉通知栏图标无异常,由于 MIUI 乱改导致无法找到方案,考虑到系统过老,本人精力有限,不再做修复,系统 ≥ MIUI 12.5 无此问题
|
||||
|
||||
# 禁止任何商业用途
|
||||
|
||||
|
@@ -623,14 +623,22 @@ class HookMain : IXposedHookLoadPackage {
|
||||
/** 获取自身 */
|
||||
val iconImageView = param.thisObject as ImageView
|
||||
|
||||
/** 是否忽略图标颜色 */
|
||||
val isIgnoredColor = lpparam.hookIgnoreStatusBarIconColor(
|
||||
iconImageView.context,
|
||||
/** 获取通知实例 */
|
||||
val expandedNf =
|
||||
param.thisObject.javaClass.getDeclaredField("mNotification").apply {
|
||||
isAccessible = true
|
||||
}[param.thisObject] as? StatusBarNotification?
|
||||
)
|
||||
|
||||
/** 是否忽略图标颜色 */
|
||||
val isIgnoredColor =
|
||||
lpparam.hookIgnoreStatusBarIconColor(iconImageView.context, expandedNf)
|
||||
/** 强制设置图标 - 防止 MIPUSH 不生效 */
|
||||
lpparam.hookSmallIconOnSet(
|
||||
context = iconImageView.context,
|
||||
expandedNf,
|
||||
iconImageView.drawable,
|
||||
isLegacyWay = true
|
||||
) { icon -> iconImageView.setImageBitmap(icon) }
|
||||
/** 当前着色颜色 */
|
||||
val currentColor =
|
||||
param.thisObject.javaClass.getDeclaredField("mCurrentSetColor").apply {
|
||||
@@ -686,7 +694,7 @@ class HookMain : IXposedHookLoadPackage {
|
||||
param.args?.get(if (isTooOld) 1 else 0) as? StatusBarNotification?,
|
||||
(param.result as Icon).loadDrawable(context),
|
||||
isLegacyWay = isTooOld
|
||||
) { icon -> param.result = icon }
|
||||
) { icon -> param.result = Icon.createWithBitmap(icon) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -363,7 +363,7 @@
|
||||
android:layout_marginBottom="10dp"
|
||||
android:alpha="0.8"
|
||||
android:lineSpacingExtra="6dp"
|
||||
android:text="Q.哪些是已知问题?\nA.以下是问题描述列表:\n(1) 在 MIUI 12 上无法对状态栏图标的 MIPUSH 图标进行通知优化适配,下拉通知栏图标无异常,由于 MIUI 乱改导致无法找到方案,考虑到系统过老,本人精力有限,不再做修复,系统 ≥ MIUI 12.5 无此问题。\n(2) 动态小图标可能会在高版本系统中闪烁,这是 MIUI 自身就存在的问题,后期只能等官方修复。\n(3) 请始终保持最新版本的 LSPosed,旧版本可能会出现 Hook 不生效的问题。"
|
||||
android:text="Q.哪些是已知问题?\nA.以下是问题描述列表:\n(1) 动态小图标可能会在高版本系统中闪烁,这是 MIUI 自身就存在的问题,后期只能等官方修复。\n(2) 请始终保持最新版本的 LSPosed,旧版本可能会出现 Hook 不生效的问题。"
|
||||
android:textColor="@color/colorTextDark"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
Reference in New Issue
Block a user