nextcloud-talk-android/app
Daniel Calviño Sánchez 3278829dba
Fix computing new sessions in a call
The new sessions are computed by substracting the old sessions (those
for which a PeerConnectionWrapper exists) from the sessions currently in
the call. However, when "oldSessions" was used for that it no longer
contained the old sessions, it only contained the sessions which were no
longer in the call. As those sessions are mutually exclusive with the
sessions currently in the call nothing was substracted from
"newSessions", and it ended being the sessions currently in the call
instead.

When the HPB is not used the list of participants in the conversation is
periodically updated every 30 seconds if no other signaling message was
received in the meantime. As the layout for a participant overrides any
previous layout for that participant this periodically reset the layout
of all participants in the call, as they were all treated as new
sessions.

When the HPB is used the list of participants in the conversation is
updated only when something changed. However, similarly to the previous
case, when that happens the layout of all participants in the call is
also reset for the same reason.

To solve that now "oldSessions" is not modified, so it contains the
sessions for which a PeerConnectionWrapper exists, and substracting it
from "newSessions" now gives only the new sessions.

The other usages of "newSessions" besides creating the connection and
setting up the layout, that is, getting the peers in the call and
changing the call status to "In conversation", should be safe if
executed only when there are new sessions rather than when there are
participants in the call but they did not change.

Resolves: #2486

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-10-13 15:23:59 +02:00
..
schemas/com.nextcloud.talk.data.source.local.TalkDatabase Room db schema v8 2022-07-01 08:59:12 +02:00
src Fix computing new sessions in a call 2022-10-13 15:23:59 +02:00
build.gradle update spotbugs config 2022-10-10 17:06:43 +02:00
lint.xml Get rid of BaseController, ButterknifeController, and ButterKnife 2022-08-18 17:19:08 +02:00
proguard-rules.pro Initial import 2017-10-23 12:40:38 +02:00