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 when starting foreground service for calling from background (WPB-11112) #3456

Conversation

ohassine
Copy link
Member

@ohassine ohassine commented Sep 19, 2024

BugWPB-11112 [Android] crash on starting foreground service for calling


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

App is crashing when user starts the call and puts it in background before the other user accepts the call

Causes (Optional)

The ongoingCallService is being started when the app is in the background

Note: The RECORD_AUDIO runtime permission is subject to while-in-use restrictions. For this reason, you cannot create a microphone foreground service while your app is in the background and you cannot launch a microphone foreground service from a BOOT_COMPLETED receiver, with a few exceptions.

Solutions

Start the call service as well when user initiate a new call

Needs releases with:

  • GitHub link to other pull request

PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@echoes-hq echoes-hq bot added the echoes: unplanned Any work item that isn’t part of the product or technical roadmap. label Sep 19, 2024
@ohassine ohassine requested review from a team, typfel, yamilmedina, alexandreferris, MohamadJaara and Garzas and removed request for a team September 19, 2024 13:48
@pull-request-size pull-request-size bot added size/L and removed size/M labels Sep 19, 2024
Copy link

sonarcloud bot commented Sep 19, 2024

@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 67.56757% with 24 lines in your changes missing coverage. Please review.

Project coverage is 44.75%. Comparing base (6f735bc) to head (61a5891).
Report is 2 commits behind head on release/candidate.

Files with missing lines Patch % Lines
...in/kotlin/com/wire/android/services/CallService.kt 0.00% 15 Missing ⚠️
...re/android/notification/WireNotificationManager.kt 86.84% 3 Missing and 2 partials ⚠️
...re/android/notification/CallNotificationManager.kt 40.00% 3 Missing ⚠️
...otlin/com/wire/android/services/ServicesManager.kt 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           release/candidate    #3456      +/-   ##
=====================================================
- Coverage              44.80%   44.75%   -0.06%     
=====================================================
  Files                    456      456              
  Lines                  15457    15452       -5     
  Branches                2583     2583              
=====================================================
- Hits                    6925     6915      -10     
- Misses                  7801     7807       +6     
+ Partials                 731      730       -1     
Files with missing lines Coverage Δ
...wire/android/notification/NotificationConstants.kt 43.75% <100.00%> (-3.31%) ⬇️
...otlin/com/wire/android/services/ServicesManager.kt 80.55% <93.33%> (ø)
...re/android/notification/CallNotificationManager.kt 37.67% <40.00%> (-7.24%) ⬇️
...re/android/notification/WireNotificationManager.kt 81.73% <86.84%> (+0.57%) ⬆️
...in/kotlin/com/wire/android/services/CallService.kt 3.12% <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 6f735bc...61a5891. Read the comment docs.

Copy link
Contributor

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

@MohamadJaara MohamadJaara added this pull request to the merge queue Sep 20, 2024
Merged via the queue into release/candidate with commit 23ea295 Sep 20, 2024
13 checks passed
@MohamadJaara MohamadJaara deleted the crash-on-starting-foreground-service-for-calling branch September 20, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: unplanned Any work item that isn’t part of the product or technical roadmap. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants