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) 🍒 #3459

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 20, 2024

This PR was automatically cherry-picked based on the following PR:

Original PR description:


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.

@github-actions github-actions bot added cherry-pick PR is cherry-picking changes from another banch echoes: unplanned Any work item that isn’t part of the product or technical roadmap. size/L labels Sep 20, 2024
@ohassine ohassine requested review from a team, typfel, yamilmedina, alexandreferris, MohamadJaara and saleniuk and removed request for a team September 23, 2024 08:13
Copy link

sonarcloud bot commented Sep 24, 2024

@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2024

Codecov Report

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

Project coverage is 44.78%. Comparing base (634ffb8) to head (97e5607).
Report is 2 commits behind head on develop.

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             @@
##           develop    #3459      +/-   ##
===========================================
- Coverage    44.83%   44.78%   -0.05%     
===========================================
  Files          466      466              
  Lines        15708    15703       -5     
  Branches      2646     2646              
===========================================
- Hits          7042     7032      -10     
- Misses        7908     7914       +6     
+ Partials       758      757       -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.41% <40.00%> (-7.23%) ⬇️
...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 634ffb8...97e5607. Read the comment docs.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@ohassine ohassine added this pull request to the merge queue Sep 24, 2024
Merged via the queue into develop with commit d7c8bc9 Sep 24, 2024
12 checks passed
@ohassine ohassine deleted the crash-on-starting-foreground-service-for-calling-cherry-pick branch September 24, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick PR is cherry-picking changes from another banch 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.

3 participants