mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-07 11:09:52 +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))
|
if (HookMedium.getBoolean(HookMedium.ENABLE_COLOR_ICON_HOOK, default = true))
|
||||||
run {
|
run {
|
||||||
if (findAppName(notifyInstance).startsWith("Android") &&
|
if (findAppName(notifyInstance).startsWith("Android") &&
|
||||||
notifyInstance.notification.extras.getCharSequence(Notification.EXTRA_TITLE)
|
(notifyInstance.notification.extras.getCharSequence(Notification.EXTRA_TITLE)
|
||||||
?.startsWith("Xposed 模块") == true
|
?.startsWith("Xposed 模块") == true ||
|
||||||
|
notifyInstance.notification.extras.getCharSequence(Notification.EXTRA_TITLE)
|
||||||
|
?.startsWith("Xposed Module") == true)
|
||||||
) customIcon = IconPackParams.lsposedIcon
|
) customIcon = IconPackParams.lsposedIcon
|
||||||
else IconPackParams.iconDatas.forEach {
|
else IconPackParams.iconDatas.forEach {
|
||||||
if ((notifyInstance.opPkgName == it.packageName ||
|
if ((notifyInstance.opPkgName == it.packageName ||
|
||||||
@@ -412,8 +414,10 @@ class HookMain : IXposedHookLoadPackage {
|
|||||||
var customIcon: Bitmap? = null
|
var customIcon: Bitmap? = null
|
||||||
if (isHookColorIcon) run {
|
if (isHookColorIcon) run {
|
||||||
if (findAppName(notifyInstance).startsWith("Android") &&
|
if (findAppName(notifyInstance).startsWith("Android") &&
|
||||||
notifyInstance.notification.extras.getCharSequence(Notification.EXTRA_TITLE)
|
(notifyInstance.notification.extras.getCharSequence(Notification.EXTRA_TITLE)
|
||||||
?.startsWith("Xposed 模块") == true
|
?.startsWith("Xposed 模块") == true ||
|
||||||
|
notifyInstance.notification.extras.getCharSequence(Notification.EXTRA_TITLE)
|
||||||
|
?.startsWith("Xposed Module") == true)
|
||||||
) customIcon = IconPackParams.lsposedIcon
|
) customIcon = IconPackParams.lsposedIcon
|
||||||
else IconPackParams.iconDatas.forEach {
|
else IconPackParams.iconDatas.forEach {
|
||||||
if ((notifyInstance.opPkgName == it.packageName ||
|
if ((notifyInstance.opPkgName == it.packageName ||
|
||||||
|
Reference in New Issue
Block a user