talk-android
talk-android copied to clipboard
Fix handling offers in already established connections
Fixes #1815 Needed for https://github.com/nextcloud/spreed/pull/6896
Once a RTCPeerConnection is established new offers can still be received for that connection. These offers will update/renegotiate the connection (for example, to add a video track to an audio only connection) and need to be handled like the offers to establish the original connection (the offer needs to be set as the remote description and a local answer needs to be created for it, set as the local description and sent to the other peer).
Pending:
- [ ] Trigger renegotiations only if
updateis provided in the offer - [ ] Reset connections if an offer without
updateis received (as done in the WebUI; this is actually a bug in the Android app) - [ ] Ensure that everything works as expected also for previous Talk versions both with and without HPB (it should, but... you know :-) )
How to test
- Setup https://github.com/nextcloud/spreed/pull/6896 (note that a specific pull request for the external signaling server is also needed)
- In the browser, start a call and, in the device checker shown before actually starting the call, select an audio device and no video device
- In the Android app, join the call
- In the browser, open the device settings, select a video device and close the device settings
- Enable video
Result with this pull request
In the Android app the video is now visible (note that, due to a bug in the WebUI, the video may be visible even before being actually enabled in the browser)
Result without this pull request
In the Android app the video is not visible
Lint
| Type | master | PR |
| Warnings | 156 | 156 |
| Errors | 1 | 1 |
SpotBugs (new)
| Warning Type | Number |
|---|---|
| Bad practice Warnings | 9 |
| Correctness Warnings | 91 |
| Experimental Warnings | 2 |
| Internationalization Warnings | 9 |
| Malicious code vulnerability Warnings | 115 |
| Performance Warnings | 27 |
| Security Warnings | 2 |
| Dodgy code Warnings | 158 |
| Total | 413 |
SpotBugs (master)
| Warning Type | Number |
|---|---|
| Bad practice Warnings | 9 |
| Correctness Warnings | 91 |
| Experimental Warnings | 2 |
| Internationalization Warnings | 9 |
| Malicious code vulnerability Warnings | 115 |
| Performance Warnings | 27 |
| Security Warnings | 2 |
| Dodgy code Warnings | 158 |
| Total | 413 |
/rebase
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/1823-talk.apk
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.
Codacy
Lint
| Type | master | PR |
| Warnings | 112 | 112 |
| Errors | 1 | 1 |
SpotBugs
| Category | Base | New |
|---|---|---|
| Bad practice | 4 | 4 |
| Correctness | 75 | 75 |
| Dodgy code | 315 | 315 |
| Experimental | 2 | 2 |
| Internationalization | 9 | 9 |
| Malicious code vulnerability | 54 | 54 |
| Performance | 22 | 22 |
| Security | 2 | 2 |
| Total | 483 | 483 |
Codacy
Lint
| Type | master | PR |
| Warnings | 112 | 111 |
| Errors | 1 | 1 |
SpotBugs
| Category | Base | New |
|---|---|---|
| Bad practice | 4 | 4 |
| Correctness | 29 | 30 |
| Dodgy code | 250 | 251 |
| Experimental | 2 | 2 |
| Internationalization | 6 | 6 |
| Malicious code vulnerability | 53 | 55 |
| Performance | 21 | 18 |
| Security | 2 | 2 |
| Total | 367 | 368 |
SpotBugs increased!
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/1823-talk.apk
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.
Codacy
Lint
| Type | master | PR |
| Warnings | 111 | 111 |
| Errors | 0 | 0 |
SpotBugs
| Category | Base | New |
|---|---|---|
| Correctness | 12 | 12 |
| Dodgy code | 174 | 174 |
| Internationalization | 5 | 5 |
| Malicious code vulnerability | 3 | 3 |
| Performance | 10 | 11 |
| Security | 2 | 2 |
| Total | 206 | 207 |
SpotBugs increased!
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/1823-talk.apk
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.
Whats the status?