-
Notifications
You must be signed in to change notification settings - Fork 28
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: answer call from notification in foreground service [WPB-9648] #3797
base: develop
Are you sure you want to change the base?
fix: answer call from notification in foreground service [WPB-9648] #3797
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3797 +/- ##
===========================================
- Coverage 45.80% 45.79% -0.01%
===========================================
Files 483 485 +2
Lines 16513 16575 +62
Branches 2783 2784 +1
===========================================
+ Hits 7563 7590 +27
- Misses 8170 8205 +35
Partials 780 780
... and 11 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Quality Gate passedIssues Measures |
Built wire-android-staging-compat-pr-3797.apk is available for download |
Built wire-android-dev-debug-pr-3797.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
We need to ensure compliance with audio focus request restrictions on Android 15:
https://developer.android.com/about/versions/15/behavior-changes-15#audio-focus
Basically, when targeting Android 15, app must be in the foreground or have foreground service working to successfully request audio focus and it’s not the case right now.
Solutions
AVS requests audio focus when starting/answering a call and when receiving incoming call - this one is probably just for the ringing sound and we provide the ringing sound via the notification and do not play it ourselves.
For starting or answering a call, there's one case when it may happen when the app is in the background - when answering from the incoming call notification. To make it work, answering logic is moved to the call service, so when answering from the notification, first the
CallService
is started with proper action so that the call is answered and audio focus requested after the foreground service is started.Testing
Test Coverage (Optional)
How to Test
Right now it's not yet possible to test it manually as it requires the app to target Android 15 (API 35), but after we update
target
then it shouldn't crash when doing these steps:-open the app
-put into background
-make a call to that user from another device
-answer from the notification
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
.