mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-04 17:55:34 +08:00
为 LSPosed 模块激活状态添加状态栏、通知栏图标
This commit is contained in:
@@ -339,8 +339,10 @@ class HookMain : IXposedHookLoadPackage {
|
||||
if (HookMedium.getBoolean(HookMedium.ENABLE_COLOR_ICON_HOOK, default = true))
|
||||
run {
|
||||
if (findAppName(notifyInstance).startsWith("Android") &&
|
||||
notifyInstance.notification.extras.getCharSequence(Notification.EXTRA_TITLE)
|
||||
?.startsWith("Xposed 模块") == true
|
||||
(notifyInstance.notification.extras.getCharSequence(Notification.EXTRA_TITLE)
|
||||
?.startsWith("Xposed 模块") == true ||
|
||||
notifyInstance.notification.extras.getCharSequence(Notification.EXTRA_TITLE)
|
||||
?.startsWith("Xposed Module") == true)
|
||||
) customIcon = IconPackParams.lsposedIcon
|
||||
else IconPackParams.iconDatas.forEach {
|
||||
if ((notifyInstance.opPkgName == it.packageName ||
|
||||
@@ -412,8 +414,10 @@ class HookMain : IXposedHookLoadPackage {
|
||||
var customIcon: Bitmap? = null
|
||||
if (isHookColorIcon) run {
|
||||
if (findAppName(notifyInstance).startsWith("Android") &&
|
||||
notifyInstance.notification.extras.getCharSequence(Notification.EXTRA_TITLE)
|
||||
?.startsWith("Xposed 模块") == true
|
||||
(notifyInstance.notification.extras.getCharSequence(Notification.EXTRA_TITLE)
|
||||
?.startsWith("Xposed 模块") == true ||
|
||||
notifyInstance.notification.extras.getCharSequence(Notification.EXTRA_TITLE)
|
||||
?.startsWith("Xposed Module") == true)
|
||||
) customIcon = IconPackParams.lsposedIcon
|
||||
else IconPackParams.iconDatas.forEach {
|
||||
if ((notifyInstance.opPkgName == it.packageName ||
|
||||
|
Reference in New Issue
Block a user