Skip to content

suppress unwanted group summary notifications when grouping disabled#53

Open
Azzipp wants to merge 1 commit into
SoClear:mainfrom
Azzipp:fix-notification-grouping
Open

suppress unwanted group summary notifications when grouping disabled#53
Azzipp wants to merge 1 commit into
SoClear:mainfrom
Azzipp:fix-notification-grouping

Conversation

@Azzipp

@Azzipp Azzipp commented Jun 6, 2026

Copy link
Copy Markdown

This change hooks android.app.Notification.isGroupSummary() to return false when notification grouping is disabled, removing extra notifications and status bar icons as shown in #46 (comment).

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a hook to the isGroupSummary method of android.app.Notification to always return false in the SystemUI hook. There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@SoClear

SoClear commented Jun 6, 2026

Copy link
Copy Markdown
Owner

not work:

Screenshot_20260607_030031_LSPosed

and it makes my systemui crash when new notification:

2026-06-07 02:53:06.701 26133-26133 LSPosedFramework               com.android.systemui                 E  (com.android.systemui)[framework,Hookers,6615-19e9e481d0c-2-1,0,1] Crash unexpectedly: pkg=com.android.systemui, prc=com.android.systemui (Fix with AI)
                                                                                                           java.lang.IllegalArgumentException: Ranking map doesn't contain key: 0|io.heckel.ntfy|0|0|io.heckel.ntfy|g:Aggregate_NormalNotificationSection|10308
                                                                                                           	at com.android.systemui.statusbar.notification.collection.NotifCollection$1.onNotificationPosted(qb/109035771 cb23c8d8e64f06c583ec04fda6a57625f99140581baa4ac6927ea39358a88aa4:46)
                                                                                                           	at com.android.systemui.statusbar.notification.collection.coalescer.GroupCoalescer$1.onNotificationPosted(qb/109035771 cb23c8d8e64f06c583ec04fda6a57625f99140581baa4ac6927ea39358a88aa4:194)
                                                                                                           	at com.android.systemui.statusbar.NotificationListener$$ExternalSyntheticLambda1.run(qb/109035771 cb23c8d8e64f06c583ec04fda6a57625f99140581baa4ac6927ea39358a88aa4:35)
                                                                                                           	at android.os.Handler.handleCallback(Handler.java:1070)
                                                                                                           	at android.os.Handler.dispatchMessage(Handler.java:125)
                                                                                                           	at android.os.Looper.dispatchMessage(Looper.java:358)
                                                                                                           	at android.os.Looper.loopOnce(Looper.java:288)
                                                                                                           	at android.os.Looper.loop(Looper.java:392)
                                                                                                           	at android.app.ActivityThread.main(ActivityThread.java:10346)
                                                                                                           	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                           	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:638)
                                                                                                           	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:972)
2026-06-07 02:53:06.701 26133-26133 AndroidRuntime                 com.android.systemui                 E  FATAL EXCEPTION: main (Fix with AI)
                                                                                                           Process: com.android.systemui, PID: 26133
                                                                                                           java.lang.IllegalArgumentException: Ranking map doesn't contain key: 0|io.heckel.ntfy|0|0|io.heckel.ntfy|g:Aggregate_NormalNotificationSection|10308
                                                                                                           	at com.android.systemui.statusbar.notification.collection.NotifCollection$1.onNotificationPosted(qb/109035771 cb23c8d8e64f06c583ec04fda6a57625f99140581baa4ac6927ea39358a88aa4:46)
                                                                                                           	at com.android.systemui.statusbar.notification.collection.coalescer.GroupCoalescer$1.onNotificationPosted(qb/109035771 cb23c8d8e64f06c583ec04fda6a57625f99140581baa4ac6927ea39358a88aa4:194)
                                                                                                           	at com.android.systemui.statusbar.NotificationListener$$ExternalSyntheticLambda1.run(qb/109035771 cb23c8d8e64f06c583ec04fda6a57625f99140581baa4ac6927ea39358a88aa4:35)
                                                                                                           	at android.os.Handler.handleCallback(Handler.java:1070)
                                                                                                           	at android.os.Handler.dispatchMessage(Handler.java:125)
                                                                                                           	at android.os.Looper.dispatchMessage(Looper.java:358)
                                                                                                           	at android.os.Looper.loopOnce(Looper.java:288)
                                                                                                           	at android.os.Looper.loop(Looper.java:392)
                                                                                                           	at android.app.ActivityThread.main(ActivityThread.java:10346)
                                                                                                           	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                           	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:638)
                                                                                                           	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:972)
2026-06-07 02:53:06.701 26133-26133 PluginManagerImpl              com.android.systemui                 E  System Crash; Disabling all plugins (Fix with AI)
                                                                                                           java.lang.IllegalArgumentException: Ranking map doesn't contain key: 0|io.heckel.ntfy|0|0|io.heckel.ntfy|g:Aggregate_NormalNotificationSection|10308
                                                                                                           	at com.android.systemui.statusbar.notification.collection.NotifCollection$1.onNotificationPosted(qb/109035771 cb23c8d8e64f06c583ec04fda6a57625f99140581baa4ac6927ea39358a88aa4:46)
                                                                                                           	at com.android.systemui.statusbar.notification.collection.coalescer.GroupCoalescer$1.onNotificationPosted(qb/109035771 cb23c8d8e64f06c583ec04fda6a57625f99140581baa4ac6927ea39358a88aa4:194)
                                                                                                           	at com.android.systemui.statusbar.NotificationListener$$ExternalSyntheticLambda1.run(qb/109035771 cb23c8d8e64f06c583ec04fda6a57625f99140581baa4ac6927ea39358a88aa4:35)
                                                                                                           	at android.os.Handler.handleCallback(Handler.java:1070)
                                                                                                           	at android.os.Handler.dispatchMessage(Handler.java:125)
                                                                                                           	at android.os.Looper.dispatchMessage(Looper.java:358)
                                                                                                           	at android.os.Looper.loopOnce(Looper.java:288)
                                                                                                           	at android.os.Looper.loop(Looper.java:392)
                                                                                                           	at android.app.ActivityThread.main(ActivityThread.java:10346)
                                                                                                           	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                           	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:638)
                                                                                                           	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:972)

@Azzipp Azzipp force-pushed the fix-notification-grouping branch from d641741 to 10f3a5d Compare June 6, 2026 20:47
@Azzipp Azzipp force-pushed the fix-notification-grouping branch from 10f3a5d to 83f122d Compare June 6, 2026 20:54
@Azzipp

Azzipp commented Jun 6, 2026

Copy link
Copy Markdown
Author

Sorry @SoClear, it was working for me and I thought a crash was from another unrelated app and didn't check. I updated the PR and it works without crashing by hooking NotifCollection.postNotification to discard group summaries before they enter the collection, which prevents the StatusBarNotification key mismatch that caused the crashing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants