更正黑色下的图标为半透明效果

This commit is contained in:
2022-03-17 23:02:31 +08:00
parent 90dda0aa52
commit c1b08c93d0
4 changed files with 9 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ android {
buildTypes {
release {
minifyEnabled true
minifyEnabled false
signingConfig signingConfigs.debug
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}

View File

@@ -546,9 +546,12 @@ class HookEntry : YukiHookXposedInitProxy {
if (hasIgnoreStatusBarIconColor(it.context, field { name = "mNotification" }
.of<StatusBarNotification>(instance))) it.colorFilter = null
/** 防止图标不是纯黑的问题 */
else it.setColorFilter(
field { name = "mCurrentSetColor" }.of<Int>(instance)
?.let { color -> if (color == -419430401) color else Color.BLACK } ?: 0)
else it.apply {
field { name = "mCurrentSetColor" }.of<Int>(instance).also { color ->
setColorFilter(if (color == -419430401) color else Color.BLACK)
alpha = if (color == -419430401) 1f else 0.8f
}
}
}
}
}