mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-06 10:45:20 +08:00
修复状态栏图标不是纯黑的问题
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -23,7 +23,7 @@
|
|||||||
</map>
|
</map>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</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" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
@@ -30,7 +30,7 @@ android {
|
|||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled true
|
minifyEnabled false
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.debug
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
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 StatusBarIconViewClass = "$SYSTEMUI_PACKAGE_NAME.statusbar.StatusBarIconView"
|
||||||
|
|
||||||
|
/** 原生存在的类 */
|
||||||
|
private const val NotificationIconContainerClass = "$SYSTEMUI_PACKAGE_NAME.statusbar.phone.NotificationIconContainer"
|
||||||
|
|
||||||
/** 根据多个版本存在不同的包名相同的类 */
|
/** 根据多个版本存在不同的包名相同的类 */
|
||||||
private val ExpandableNotificationRowClass = VariousClass(
|
private val ExpandableNotificationRowClass = VariousClass(
|
||||||
"$SYSTEMUI_PACKAGE_NAME.statusbar.notification.row.ExpandableNotificationRow",
|
"$SYSTEMUI_PACKAGE_NAME.statusbar.notification.row.ExpandableNotificationRow",
|
||||||
@@ -532,7 +535,10 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
instance<ImageView>().also {
|
instance<ImageView>().also {
|
||||||
if (hasIgnoreStatusBarIconColor(it.context, field { name = "mNotification" }
|
if (hasIgnoreStatusBarIconColor(it.context, field { name = "mNotification" }
|
||||||
.of<StatusBarNotification>(instance))) it.colorFilter = null
|
.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