Skip to content

Fix call state timing regression causing delayed audio routing#6092

Closed
alexey22p wants to merge 1 commit intonextcloud:stable-22.1from
alexey22p:fix-call-state
Closed

Fix call state timing regression causing delayed audio routing#6092
alexey22p wants to merge 1 commit intonextcloud:stable-22.1from
alexey22p:fix-call-state

Conversation

@alexey22p
Copy link
Copy Markdown

@alexey22p alexey22p commented Apr 20, 2026

Summary

This patch restores the original call initialization timing from 22.0.3.

In 22.1.x prepareCall() was moved later behind permission checks and foreground service startup.
As a result currentCallStatus = IN_CONVERSATION may be set later than before.

On some devices this can delay audio routing, speakerphone activation, or other call startup behavior.

Root cause

Regression introduced during call startup refactoring in 22.1.x.

Fix

Move prepareCall() earlier to match the previous 22.0.3 behavior.

Testing

Built locally and verified startup sequence changes.

Full push-notification based incoming-call testing could not be completed in the local build environment because Google push services were unavailable.

Regression comparison performed between:

  • v22.0.3
  • v22.1.0rc1

Signed-off-by: alexey22p <potlov22@gmail.com>
@mahibi
Copy link
Copy Markdown
Collaborator

mahibi commented Apr 20, 2026

Thank you @alexey22p we will have a closer look

@mahibi mahibi self-requested a review April 20, 2026 13:06
@mahibi
Copy link
Copy Markdown
Collaborator

mahibi commented Apr 22, 2026

Thank you @alexey22p
It makes sense codewise to call the stopCallingSound() in prepareCall()
I am not able to reproduce the bug but codewise it makes sense and the change will be taken.

However i created #6103 and moved the stopCallingSound() outside of the if (permissionUtil!!.isMicrophonePermissionGranted()) check.

Hope that's okay for you, it's just done in a separate PR as i want to move quickly forward.
Thanks again for the pointer! 👍

@alexey22p
Copy link
Copy Markdown
Author

Thanks, Mahibi, that makes sense.

Moving stopCallingSound() separately is a cleaner minimal fix.
Glad the investigation helped identify the right spot.

@alexey22p alexey22p closed this Apr 22, 2026
@alexey22p alexey22p reopened this Apr 22, 2026
@alexey22p alexey22p closed this Apr 22, 2026
AsherBond pushed a commit to AsherBond/talk-android that referenced this pull request Apr 22, 2026
Some users complain about ringtone continuing to ring when a call is joined.
It could not be reproduced but code wise it makes sense to call stopCallingSound here.

This is adapted from the PR
nextcloud#6092

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
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