Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop incoming call ringing if answered on another device. #3842

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Nov 8, 2024

Content

First commit is code cleanup.

Observe if the user is in the call. If the call is still ringing, it will stop ringing and do not display the "missing call" notification.

Motivation and context

See element-hq/element-meta#2599

Screenshots / GIFs

Tests

  • Alice is logged in on EXA
  • Alice is also logged in on EW
  • Bob calls Alice using Element Call
  • Alice EXA is ringing
  • Alice answers on Element Web

Observe that Alice phone is not ringing anymore and the notification about the (missed) call is not displayed

Also check that the code behaves correctly if Aliace answers the call from EXA.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@bmarty bmarty requested a review from a team as a code owner November 8, 2024 15:46
@bmarty bmarty requested review from ganfra and removed request for a team November 8, 2024 15:46
} else if (userIsInTheCall) {
// The user joined the call from another session
timedOutCallJob?.cancel()
incomingCallTimedOut(displayMissedCallNotification = false)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that if the call is not ringing anymore we will run this onEach block because we are still observing the roomInfoFlow, but there is some filtering on incomingCallTimedOut that saves us.

Copy link
Contributor

github-actions bot commented Nov 8, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/bn6yoW

Copy link

sonarcloud bot commented Nov 8, 2024

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 82.98%. Comparing base (cf9dbc6) to head (f372295).
Report is 20 commits behind head on develop.

Files with missing lines Patch % Lines
...roid/features/call/impl/utils/ActiveCallManager.kt 40.00% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3842      +/-   ##
===========================================
- Coverage    82.98%   82.98%   -0.01%     
===========================================
  Files         1783     1783              
  Lines        44971    44976       +5     
  Branches      5289     5292       +3     
===========================================
+ Hits         37320    37322       +2     
- Misses        5805     5808       +3     
  Partials      1846     1846              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmarty bmarty merged commit 4721380 into develop Nov 12, 2024
24 of 26 checks passed
@bmarty bmarty deleted the feature/bma/stopIncomingcall branch November 12, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants