Skip to content

Improve call ringtone selection - #7039

Draft
mahibi wants to merge 2 commits into
masterfrom
fixCallRingtoneSelection
Draft

mahibi wants to merge 2 commits into
masterfrom
fixCallRingtoneSelection

Conversation

@mahibi

@mahibi mahibi commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes choosing sounds for calls and messages in Settings → Notifications.

Problem 1

  • On Samsung (One UI), the system channel settings only offer notification sounds for the calls channel. They ignore that the channel uses USAGE_NOTIFICATION_RINGTONE, so no real call ringtone can be selected.

Problem 2

  • The bundled default sounds ("Librem by feandesign") are app resources, not system sounds. Neither the channel settings nor the system ringtone picker offer them, so once another sound is chosen there's no way back.

Solution

  • Tapping Calls/Messages → Sound opens a dialog: "Librem by feandesign" or "Other sound…". "Other sound…" opens the system ringtone picker with TYPE_RINGTONE for calls and TYPE_NOTIFICATION for messages. The picker's "Default" entry is the phone's default sound.
  • An app can't change the sound of an existing channel, and a deleted channel comes back with its old settings if it's recreated with the same ID. So when the sound changes, the channel is recreated under a versioned ID (NOTIFICATION_CHANNEL_CALLS_V5__<timestamp>, NOTIFICATION_CHANNEL_MESSAGES_V4__<timestamp>), keeping its other settings (importance, vibration, lights, badge, lock-screen visibility).
  • The code-level _V5/_V4 versioning is unchanged. Bumping it still drops all channels of the old version.
  • If a channel is turned off, or the phone has no ringtone picker, the system channel settings open as before.

🖼️ Screenshots

Screenshot to solve switching back to built in ringtone
grafik

🚧 TODO

  • Test on different devices: pick a ringtone/sound, go back to Librem, check that the channel's other settings are kept
  • Check whether changing the message sound drops per-conversation notification customizations

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

On some OEMs (e.g. Samsung) the system notification channel settings only
offer notification sounds for the calls channel, even though it uses
USAGE_NOTIFICATION_RINGTONE, so no call ringtone could be selected.

Open an in-app ringtone picker with TYPE_RINGTONE instead (as done by
Signal). As the sound of an existing channel can't be changed by the app,
the calls channel is recreated under a new versioned id
(NOTIFICATION_CHANNEL_CALLS_V5__<timestamp>) keeping its other settings.
The system channel settings are still opened if the channel is disabled
or no ringtone picker is available.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The app ships its own default sounds ("Librem by feandesign") for calls and
messages. These are app resources, not system sounds, so neither the system
channel settings nor the system ringtone picker offer them. Once a user
picked another call ringtone or message sound, there was no way back to the
bundled default.

Tapping the call or message sound now shows a dialog offering the bundled
default or "Other sound…", which opens the system picker. The picker's
"Default" entry now refers to the phone's default ringtone/notification
sound, so it means the same on all devices.

Message sounds are chosen in-app like call ringtones. As the sound of an
existing channel can't be changed by the app, the messages channel is
recreated under a versioned id (NOTIFICATION_CHANNEL_MESSAGES_V4__<timestamp>)
the same way as the calls channel, sharing the recreation logic.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi self-assigned this Nov 12, 2026
@mahibi mahibi added this to the 26.0.0 milestone Nov 12, 2026
@mahibi mahibi changed the title Fix call ringtone selection Improve call ringtone selection Nov 12, 2026
@mahibi
mahibi marked this pull request as ready for review November 12, 2026 15:00
@mahibi
mahibi requested a review from rapterjet2004 November 12, 2026 15:00
@github-actions

Copy link
Copy Markdown
Contributor

Codacy

Lint

TypemasterPR
Warnings1717
Errors00

SpotBugs

CategoryBaseNew
Bad practice77
Correctness88
Dodgy code4040
Internationalization33
Malicious code vulnerability33
Performance77
Security1111
Total7979

@mahibi
mahibi marked this pull request as draft November 12, 2026 17:51
@github-actions

Copy link
Copy Markdown
Contributor

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit c25621d
Version 7039
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant