mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-05 10:15:31 +08:00
修复状态栏图标不是纯黑的问题
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -23,7 +23,7 @@
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
@@ -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