mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-06 18:55:37 +08:00
Merge code
This commit is contained in:
@@ -607,8 +607,11 @@ class SystemUIHooker : YukiBaseHooker() {
|
|||||||
}
|
}
|
||||||
afterHook {
|
afterHook {
|
||||||
if (firstArgs != null) instance<ImageView>().also {
|
if (firstArgs != null) instance<ImageView>().also {
|
||||||
|
/** 注册壁纸颜色监听 */
|
||||||
registerWallpaperColorChanged(it)
|
registerWallpaperColorChanged(it)
|
||||||
|
/** 注册广播 */
|
||||||
registerReceiver(it.context)
|
registerReceiver(it.context)
|
||||||
|
/** 缓存实例 */
|
||||||
statusBarIconViews.add(it)
|
statusBarIconViews.add(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -691,13 +694,18 @@ class SystemUIHooker : YukiBaseHooker() {
|
|||||||
param(ContextClass, IntentClass)
|
param(ContextClass, IntentClass)
|
||||||
}
|
}
|
||||||
afterHook {
|
afterHook {
|
||||||
|
firstArgs<Context>()?.also {
|
||||||
|
/** 注册广播 */
|
||||||
|
registerReceiver(it)
|
||||||
|
/** 注册定时监听 */
|
||||||
if (isEnableHookColorNotifyIcon() && prefs.get(DataConst.ENABLE_NOTIFY_ICON_FIX_AUTO))
|
if (isEnableHookColorNotifyIcon() && prefs.get(DataConst.ENABLE_NOTIFY_ICON_FIX_AUTO))
|
||||||
IconAdaptationTool.prepareAutoUpdateIconRule(
|
IconAdaptationTool.prepareAutoUpdateIconRule(
|
||||||
context = firstArgs()!!,
|
context = it,
|
||||||
timeSet = prefs.get(DataConst.NOTIFY_ICON_FIX_AUTO_TIME)
|
timeSet = prefs.get(DataConst.NOTIFY_ICON_FIX_AUTO_TIME)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user