尝试修复 MIUI 12 的问题

This commit is contained in:
2022-04-04 13:48:54 +08:00
parent d91d2736e6
commit 5d81b8ff87

View File

@@ -274,15 +274,6 @@ class SystemUIHooker : YukiBaseHooker() {
}
}
/**
* 获取当前通知栏的样式
*
* - ❗新版本可能不存在这个方法
* @return [Boolean]
*/
private val isShowMiuiStyle
get() = safeOfFalse { NotificationUtilClass.clazz.method { name = "showMiuiStyle" }.get().invoke() ?: false }
/**
* 处理为圆角图标
* @return [Drawable]
@@ -689,11 +680,7 @@ class SystemUIHooker : YukiBaseHooker() {
name = "shouldSubstituteSmallIcon"
param(ExpandedNotificationClass)
}
/**
* MIUI 12 在非原生样式下 MIPUSH 的图标着色异常
* 所以判断是 MIUI 样式就停止 Hook 状态栏图标
*/
replaceAny { hasIgnoreStatusBarIconColor.not() && isShowMiuiStyle }
replaceToFalse()
}
/** 强制回写系统的状态栏图标样式为原生 */
injectMember {