Repository navigation
fix: notification icons on ColorOS 16 (fixAppIcon, drawable override, sizing) - #104
Closed
h465855hgg wants to merge 3 commits into
Closed
h465855hgg wants to merge 3 commits into
h465855hgg wants to merge 3 commits into
Conversation
ColorOS 16.0.5 ships OplusNotificationFixHelper.fixAppIcon and keeps replacing notification icons with app icons even though fixSmallIcon is intercepted. Intercept both.
- normalize replaced status bar icons to the ColorOS 20dp slot (0.8x) so they match the system icon size - enforce the module drawable through ImageView.setImageDrawable when the system resets the icon after styling - restyle conversation notifications after updateIconWithAppIconIfNeeded - pick readable glyph colors for light badges and light panels
h465855hgg
marked this pull request as draft
October 28, 2026 02:47
h465855hgg
marked this pull request as ready for review
October 28, 2026 02:55
Author
Record_2026-10-28-15-01-44_401ff76492c7d5c4b6e2ac93ffeafc64.mp4可能出现的问题:在配置里有很多默认没开启覆盖的软件图标可能 绘制的背景 并不会生效而是取自图标内的颜色 需要手动打开覆盖才行,如视频所示 |
Author
这个我也不太确定,哔哩哔哩的话就正常不需要覆盖也能用上,但贴吧就得开这个覆盖,或需可以加个一键启用的功能/多选/全选/ 列表等 |
Owner
|
PR 有问题,它暴力重设所有图标,对比了 16/17 的源码,无法复现,目前的 Hook 点都是准确的,唯一怀疑就是,是不是用了别的模块 Hook 了系统界面,这些变化都无法认定于来自于这个模块 建议后续: 但是我不会将这个作为主分支合并,可以先自用,后期看有没有其他人存在这个问题,我再继续收集有用的问题信息 |
Author
|
ok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the notification icon problems on ColorOS 16 (tested on OnePlus PJF110 / ColorOS 16.0.5.701 / Android 16).
Symptoms
Root causes
ColorOS 16 renamed the app-icon substitution path.
OplusNotificationFixHelperinoplus-services.jarnow runsfixAppIcon, while the module only interceptsfixSmallIcon(logcat:NotificationService--OplusNotificationFixHelper: fixAppIcon: pkg=...), so the substitution keeps running.The system resets the icon drawable after we style it.
setImageDrawable()is called again on the icon view; for QQ the module drawable was replaced 48 times per minute.Conversation notifications bypass our hook. Notifications with an avatar (QQ) go through
OplusNotificationHeaderViewWrapperExImp.updateIconWithAppIconIfNeededand never hitproxyOnContentUpdated, so they are never styled.Status bar icon size. ColorOS SystemUI uses
status_bar_icon_size = 20dp(AOSP: 22dp).StatusBarIconViewisCENTER_INSIDE, so a bitmap >= the slot gets clamped and ends up ~52.5px (15dp) whether the source is 22dp or 20dp.Changes
FrameworkHooker: also interceptfixAppIcon.SystemUIHooker:0.8 x status_bar_icon_sizeImageView.setImageDrawableand substitute the module drawable for icon views the module has taken overupdateIconWithAppIconIfNeededVerification
fixAppIcon:on every boot,Icon drawable was replaced by system48x/min for QQ#6BB8F1rounded background, LSPosed uses its pink notification color, status bar icons match the system sizeNotes
0.8factor is a tunable constant; on 560dpi the rendered ink is still ~52px, use0.6if a smaller icon is preferred中文摘要:ColorOS 16 把
fixSmallIcon换成了fixAppIcon,且会在模块设置图标后再次覆盖;会话通知(QQ)还走updateIconWithAppIconIfNeeded。这三处都已处理,另外把状态栏图标按 ColorOS 的 20dp 槽位缩放,并修正浅色背景/面板上的 glyph 颜色。