From 6f07e27905c2786b4f1347e33043f1f06355a944 Mon Sep 17 00:00:00 2001 From: freetlab Date: Sun, 12 Jul 2026 12:20:41 +0200 Subject: [PATCH] fix(alarm): silence the fire channel explicitly instead of by omission MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Omitting setSound on a NotificationChannel leaves the platform DEFAULT notification sound active — omission is not silence. The v3 channel now calls setSound(null, null) exactly like the pre-notice channel does, so the native STREAM_ALARM player stays the ring's only audible source. Caught by verification against design D4 before any build. --- .../freetimelab/pluriwave/PluriWaveAlarmService.kt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/android/app/src/main/kotlin/es/freetimelab/pluriwave/PluriWaveAlarmService.kt b/android/app/src/main/kotlin/es/freetimelab/pluriwave/PluriWaveAlarmService.kt index 7378cc9..3fb1720 100644 --- a/android/app/src/main/kotlin/es/freetimelab/pluriwave/PluriWaveAlarmService.kt +++ b/android/app/src/main/kotlin/es/freetimelab/pluriwave/PluriWaveAlarmService.kt @@ -674,17 +674,21 @@ class PluriWaveAlarmService : Service() { migrateLegacyChannels(context, manager) // Re-create each time (not early-returning when present) so the // localized name/description refresh after a locale change. Android - // updates name + description on an existing channel; importance - // stays fixed from first creation. No setSound call: this channel - // is silent by construction (Requirement: Fire notification posts - // with no sound) -- the native MediaPlayer on STREAM_ALARM is the - // only audible source, so a channel sound would double it. + // updates name + description on an existing channel; importance and + // sound stay fixed from first creation. setSound(null, null) is + // REQUIRED for silence: omitting the call leaves the platform + // DEFAULT notification sound on the channel (same reason the + // pre-notice channel calls it explicitly). This channel must be + // silent (Requirement: Fire notification posts with no sound) -- + // the native MediaPlayer on STREAM_ALARM is the only audible + // source, so a channel sound would double it. val channel = NotificationChannel( CHANNEL_ID, AlarmNotificationStrings.fireChannelName(context), NotificationManager.IMPORTANCE_HIGH ).apply { description = AlarmNotificationStrings.fireChannelDescription(context) + setSound(null, null) enableVibration(true) } manager.createNotificationChannel(channel)