mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-06 02:35:32 +08:00
修复状态栏图标不是纯黑的问题
This commit is contained in:
@@ -30,7 +30,7 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
minifyEnabled false
|
||||
signingConfig signingConfigs.debug
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
|
@@ -79,6 +79,9 @@ class HookEntry : YukiHookXposedInitProxy {
|
||||
/** 原生存在的类 */
|
||||
private const val StatusBarIconViewClass = "$SYSTEMUI_PACKAGE_NAME.statusbar.StatusBarIconView"
|
||||
|
||||
/** 原生存在的类 */
|
||||
private const val NotificationIconContainerClass = "$SYSTEMUI_PACKAGE_NAME.statusbar.phone.NotificationIconContainer"
|
||||
|
||||
/** 根据多个版本存在不同的包名相同的类 */
|
||||
private val ExpandableNotificationRowClass = VariousClass(
|
||||
"$SYSTEMUI_PACKAGE_NAME.statusbar.notification.row.ExpandableNotificationRow",
|
||||
@@ -532,7 +535,10 @@ class HookEntry : YukiHookXposedInitProxy {
|
||||
instance<ImageView>().also {
|
||||
if (hasIgnoreStatusBarIconColor(it.context, field { name = "mNotification" }
|
||||
.of<StatusBarNotification>(instance))) it.colorFilter = null
|
||||
else it.setColorFilter(field { name = "mCurrentSetColor" }.of<Int>(instance) ?: 0)
|
||||
/** 防止图标不是纯黑的问题 */
|
||||
else it.setColorFilter(
|
||||
field { name = "mCurrentSetColor" }.of<Int>(instance)
|
||||
?.let { color -> if (color == -419430401) color else Color.BLACK } ?: 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user