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

fix: Crash on call to non-currentUser WPB-15804 #3859

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

borichellow
Copy link
Contributor

@borichellow borichellow commented Feb 5, 2025

BugWPB-15804 [Android] App crashing on oncoming group call if 2 users are logged in and in the same group conversation

What's new in this PR?

Issues

  1. Crash receiving a call to non-currentUser
    STR:
  • login on 2 users at 1 device
  • call into user that is not "current"
    result: crash CallStyle notifications must either be for a foreground Service or use a fullScreenIntent.
  1. wrong call ended on click Decline in notification
    STR:
  • login on 2 users at 1 device
  • add both users to the same group
  • call in that group from some other user
  • receive 2 notifications about calling
  • decline call for current user
    result: cal declined for non-currentUser

Causes (Optional)

  1. For distinguish and do not auto-switching account when the call comes to non-currentUser we made notification for that users regular, not FullScreenIntent. But the problem that we can't use CallStyle for the notification in that case.
  2. requestCode for the PendingIntent for actions in notification are the same for the same conversation but different users: while creating request code only conversationId is taken into consideration. As result: 2 notifications for 2 users but for the same conversation (in group call, or message in group) have actions with the same PendingIntents.

Solutions

  1. Remove CallStyle for not-FullScreenIntent notifications and add regular Actions for open a call Or decline it.
  2. Update creating requestCode for the PendingIntent to take userId into consideration.

@borichellow borichellow self-assigned this Feb 5, 2025
@echoes-hq echoes-hq bot added the echoes: product-roadmap/bug Work contributing to resolve a bug not critical enough to have raised an incident. label Feb 5, 2025
@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.

Project coverage is 45.43%. Comparing base (24cdf16) to head (622a5f3).

Files with missing lines Patch % Lines
...in/com/wire/android/notification/PendingIntents.kt 0.00% 11 Missing ⚠️
...m/wire/android/notification/NotificationActions.kt 0.00% 8 Missing ⚠️
...re/android/notification/CallNotificationManager.kt 0.00% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3859      +/-   ##
===========================================
- Coverage    45.46%   45.43%   -0.03%     
===========================================
  Files          491      491              
  Lines        17008    17018      +10     
  Branches      2846     2848       +2     
===========================================
  Hits          7732     7732              
- Misses        8489     8499      +10     
  Partials       787      787              
Files with missing lines Coverage Δ
...re/android/notification/CallNotificationManager.kt 39.20% <0.00%> (-0.23%) ⬇️
...m/wire/android/notification/NotificationActions.kt 0.00% <0.00%> (ø)
...in/com/wire/android/notification/PendingIntents.kt 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24cdf16...622a5f3. Read the comment docs.

Copy link
Contributor

github-actions bot commented Feb 5, 2025

Built wire-android-staging-compat-pr-3859.apk is available for download

Copy link
Contributor

github-actions bot commented Feb 5, 2025

Built wire-android-dev-debug-pr-3859.apk is available for download

Copy link
Contributor

github-actions bot commented Feb 5, 2025

Built wire-android-staging-compat-pr-3859.apk is available for download

Copy link
Contributor

github-actions bot commented Feb 5, 2025

Built wire-android-dev-debug-pr-3859.apk is available for download

Copy link

sonarqubecloud bot commented Feb 6, 2025

Copy link
Contributor

github-actions bot commented Feb 6, 2025

Built wire-android-staging-compat-pr-3859.apk is available for download

Copy link
Contributor

github-actions bot commented Feb 6, 2025

Built wire-android-dev-debug-pr-3859.apk is available for download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: product-roadmap/bug Work contributing to resolve a bug not critical enough to have raised an incident. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants