element-hq / element-x-android

Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
GNU Affero General Public License v3.0
1.08k stars 155 forks source link

Call: ensure that the microphone is working when the application is backgrounded. #3685

Closed bmarty closed 1 month ago

bmarty commented 1 month ago

Content

Request audio focus only when the call is actually started and start the foreground service as soon as the call is started. Second commit change the service permission. We do not really need the permission MANAGE_OWN_CALLS but are rather interested by FOREGROUND_SERVICE_MICROPHONE.

Motivation and context

Close #3679

Screenshots / GIFs

Tests

the call should stay active, with a working microphone

Tested devices

Checklist

github-actions[bot] commented 1 month ago

:iphone: Scan the QR code below to install the build (arm64 only) for this PR. QR code If you can't scan the QR code you can install the build via this link: https://i.diawi.com/hRxHWS

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 22.22222% with 14 lines in your changes missing coverage. Please review.

Project coverage is 82.81%. Comparing base (a4966ef) to head (5d09d9c). Report is 21 commits behind head on develop.

Files with missing lines Patch % Lines
...droid/features/call/impl/ui/ElementCallActivity.kt 0.00% 8 Missing :warning:
...atures/call/impl/services/CallForegroundService.kt 0.00% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3685 +/- ## =========================================== - Coverage 82.81% 82.81% -0.01% =========================================== Files 1748 1748 Lines 41777 41782 +5 Branches 5108 5109 +1 =========================================== + Hits 34597 34601 +4 - Misses 5365 5366 +1 Partials 1815 1815 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

jmartinesp commented 1 month ago

cc @toger5 since he was especially interested in this. He might also be a good early tester 😛 .

davidegirardi commented 1 month ago

I tested the latest nightly. It failed on the very first call but then worked with no issues, even if I revoked the picture in picture permissions.