Browse Source

Close the call activity when leaving the call only if remotely triggered

If the local participant leaves the call the participant list will be
updated with the new call flags. However, that does not necessarily mean
that a moderator ended the call; the call could have been left too by
the Android app due to a forced reconnection or a time out when starting
the call. In those cases the call activity should be kept open, and only
when the local participant left the call due to a remote action the call
activity should be closed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Daniel Calviño Sánchez 2 years ago
parent
commit
fdbcc3b16d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/src/main/java/com/nextcloud/talk/activities/CallActivity.java

+ 1 - 1
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java

@@ -1798,7 +1798,7 @@ public class CallActivity extends CallBaseActivity {
                 }
             } else {
                 Log.d(TAG, "   inCallFlag of currentSessionId: " + inCallFlag);
-                if (inCallFlag == 0) {
+                if (inCallFlag == 0 && !CallStatus.LEAVING.equals(currentCallStatus) && ApplicationWideCurrentRoomHolder.getInstance().isInCall()) {
                     Log.d(TAG, "Most probably a moderator ended the call for all.");
                     hangup(true);
                 }