Skip to content

Filter notifications to communication apps + add now-playing media row#1

Merged
AliRezaTaleghani merged 1 commit into
mainfrom
feat/notif-filter-media-row
Jun 12, 2026
Merged

Filter notifications to communication apps + add now-playing media row#1
AliRezaTaleghani merged 1 commit into
mainfrom
feat/notif-filter-media-row

Conversation

@AliRezaTaleghani

Copy link
Copy Markdown
Contributor

The notification listener captured every notification with any text, so persistent junk (Chrome open-tab, foreground services, USB, VPN) leaked onto the home screen and music players showed only as plain text.

Rework SlimNotificationListener.onNotificationPosted into an ordered pipeline:

  • Route media first (CATEGORY_TRANSPORT / EXTRA_MEDIA_SESSION token) so ongoing media isn't dropped by the noise filter below.
  • Drop ongoing / foreground-service notifications (the actual noise).
  • Communication-only filter (user toggle, default on): keep only message / call / email / social / missed-call categories.

NotificationRegistry now tracks media separately (MediaInfo with title/artist/album-art, read via MediaController from the session token, falling back to notification extras + large icon). The Active section renders matching apps as a now-playing row: album art, "Title - Artist", and a music badge; tap still opens the player. No new layout, no extra permission — the existing notification-listener grant covers MediaController.

Also: tapping the weather chip no longer jumps into Settings (easy mis-tap), and a "Communication apps only" toggle is added under a new Settings > Notifications section.

Verified on device: weather tap inert; filter blocks noise when on and passes when off; Phocid now-playing row renders with art + track + badge.

The notification listener captured every notification with any text, so
persistent junk (Chrome open-tab, foreground services, USB, VPN) leaked
onto the home screen and music players showed only as plain text.

Rework SlimNotificationListener.onNotificationPosted into an ordered
pipeline:
- Route media first (CATEGORY_TRANSPORT / EXTRA_MEDIA_SESSION token) so
  ongoing media isn't dropped by the noise filter below.
- Drop ongoing / foreground-service notifications (the actual noise).
- Communication-only filter (user toggle, default on): keep only
  message / call / email / social / missed-call categories.

NotificationRegistry now tracks media separately (MediaInfo with
title/artist/album-art, read via MediaController from the session token,
falling back to notification extras + large icon). The Active section
renders matching apps as a now-playing row: album art, "Title - Artist",
and a music badge; tap still opens the player. No new layout, no extra
permission — the existing notification-listener grant covers MediaController.

Also: tapping the weather chip no longer jumps into Settings (easy
mis-tap), and a "Communication apps only" toggle is added under a new
Settings > Notifications section.

Verified on device: weather tap inert; filter blocks noise when on and
passes when off; Phocid now-playing row renders with art + track + badge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@AliRezaTaleghani AliRezaTaleghani merged commit 00cf860 into main Jun 12, 2026
1 check passed
@AliRezaTaleghani AliRezaTaleghani deleted the feat/notif-filter-media-row branch June 12, 2026 06:33
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.

1 participant