-
Notifications
You must be signed in to change notification settings - Fork 26
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: keep OngoingCallService always running during call [WPB-10467] #3300
fix: keep OngoingCallService always running during call [WPB-10467] #3300
Conversation
…into fix/keep-service-always-running-during-call
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/candidate #3300 +/- ##
==================================================
Coverage 44.55% 44.55%
==================================================
Files 453 453
Lines 15331 15322 -9
Branches 2558 2557 -1
==================================================
- Hits 6831 6827 -4
+ Misses 7782 7778 -4
+ Partials 718 717 -1
Continue to review full report in Codecov by Sentry.
|
Built wire-android-staging-compat-pr-3300.apk is available for download |
Built wire-android-internal-compat-pr-3300.apk is available for download |
…into fix/keep-service-always-running-during-call
Quality Gate passedIssues Measures |
Thanks for this 88.88 % 👏 |
Built wire-android-staging-compat-pr-3300.apk is available for download |
Built wire-android-internal-compat-pr-3300.apk is available for download |
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
There are some
ForegroundServiceStartNotAllowedException
crashes.Causes (Optional)
This exception happens when when trying to start foreground service while the app is not allowed to do so, like when the app is considered to be in the background. More on that here: https://developer.android.com/develop/background-work/services/foreground-services#bg-access-restrictions
Sometimes the
onStop
event is emitted with some delay, we can't really make sure that the app will fit within the allowed time, it's not clear how the system determines whether the app is still able to start foreground service or not.Solutions
Instead of starting the
OngoingCallService
only when the app goes into background, start it always when there's a new ongoing call and keep it running until it ends, so that the service is not stopped and started again when user puts app into foreground and background, so it's way less error-prone, and in that case starting foreground service should always be allowed because it happens right when the user makes an action to start or answer the call.We actually already have that logic for Android 14 upwards, because of the microphone background restrictions, so another benefit of this change is that we will have that unified for all Android versions.
Testing
Test Coverage (Optional)
How to Test
Create or join a call, the notification about ongoing call indicating that the
OngoingCallService
is running should be visible during the entire call, no matter if the app is in the background or foreground and it shouldn't crash when putting the app into background during the call.PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.