mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-07 03:05:44 +08:00
尝试修复部分系统的问题,适配 ColorOS 11
This commit is contained in:
@@ -84,16 +84,18 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
/** 原生存在的类 */
|
/** 原生存在的类 */
|
||||||
private const val IconManagerClass = "$SYSTEMUI_PACKAGE_NAME.statusbar.notification.icon.IconManager"
|
private const val IconManagerClass = "$SYSTEMUI_PACKAGE_NAME.statusbar.notification.icon.IconManager"
|
||||||
|
|
||||||
/** ColorOS 存在的类 */
|
/** ColorOS 存在的类 - 旧版本不存在 */
|
||||||
private const val OplusContrastColorUtilClass = "com.oplusos.util.OplusContrastColorUtil"
|
private const val OplusContrastColorUtilClass = "com.oplusos.util.OplusContrastColorUtil"
|
||||||
|
|
||||||
/** ColorOS 存在的类 */
|
|
||||||
private const val OplusPowerNotificationWarningsClass =
|
|
||||||
"com.oplusos.systemui.notification.power.OplusPowerNotificationWarnings"
|
|
||||||
|
|
||||||
/** ColorOS 存在的类 */
|
/** ColorOS 存在的类 */
|
||||||
private const val SystemPromptControllerClass = "com.oplusos.systemui.statusbar.policy.SystemPromptController"
|
private const val SystemPromptControllerClass = "com.oplusos.systemui.statusbar.policy.SystemPromptController"
|
||||||
|
|
||||||
|
/** 根据多个版本存在不同的包名相同的类 */
|
||||||
|
private val OplusPowerNotificationWarningsClass = VariousClass(
|
||||||
|
"com.oplusos.systemui.notification.power.OplusPowerNotificationWarnings",
|
||||||
|
"com.coloros.systemui.notification.power.ColorosPowerNotificationWarnings"
|
||||||
|
)
|
||||||
|
|
||||||
/** 根据多个版本存在不同的包名相同的类 */
|
/** 根据多个版本存在不同的包名相同的类 */
|
||||||
private val ExpandableNotificationRowClass = VariousClass(
|
private val ExpandableNotificationRowClass = VariousClass(
|
||||||
"$SYSTEMUI_PACKAGE_NAME.statusbar.notification.row.ExpandableNotificationRow",
|
"$SYSTEMUI_PACKAGE_NAME.statusbar.notification.row.ExpandableNotificationRow",
|
||||||
@@ -293,7 +295,8 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/** 修复并替换 ColorOS 原生灰度图标色彩判断 */
|
/** 修复并替换新版本 ColorOS 原生灰度图标色彩判断 */
|
||||||
|
if (OplusContrastColorUtilClass.hasClass)
|
||||||
NotificationUtilsClass.hook {
|
NotificationUtilsClass.hook {
|
||||||
injectMember {
|
injectMember {
|
||||||
method {
|
method {
|
||||||
|
Reference in New Issue
Block a user