From 0c30e37b7094e271cedf2dd7c6a05df7a8343e62 Mon Sep 17 00:00:00 2001 From: heaven Date: Thu, 23 Apr 2026 00:50:55 +0300 Subject: [PATCH] Gate incoming-call ring audio on App.isActive to stop double-ring in the brief window after app backgrounding --- src/app/pages/IncomingCallStripRenderer.tsx | 55 ++++++++++++++++++--- 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/src/app/pages/IncomingCallStripRenderer.tsx b/src/app/pages/IncomingCallStripRenderer.tsx index 852f88cb..2fefdb26 100644 --- a/src/app/pages/IncomingCallStripRenderer.tsx +++ b/src/app/pages/IncomingCallStripRenderer.tsx @@ -6,17 +6,24 @@ // IncomingCallStripRenderer is platform-agnostic: if JS knows about an incoming // ring, we render the in-app strip. On Android the native FCM service decides // independently whether to surface a system CallStyle notification; when the -// app is foregrounded it now suppresses that banner, so this renderer no longer -// needs to mirror native foreground policy in JS. +// app is foregrounded it suppresses that banner, so strip render itself does +// not need to mirror foreground policy in JS. +// +// Ring audio DOES mirror foreground policy — gated on `appActive` (techdebt +// §5.39): when the app/tab is hidden the platform surface (Android CallStyle / +// web SW push) owns ringtone UX, and playing the in-app