Merge pull request #2392 from nextcloud/fix-disposing-local-stream-when-the-call-activity-is-not-being-left

Fix disposing local stream when the call activity is not being left
This commit is contained in:
Tim Krüger 2022-09-19 15:17:59 +02:00 committed by GitHub
commit 5bbd26028f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1167,6 +1167,14 @@ public class CallActivity extends CallBaseActivity {
@Override
public void onDestroy() {
if (localStream != null) {
localStream.dispose();
localStream = null;
Log.d(TAG, "Disposed localStream");
} else {
Log.d(TAG, "localStream is null");
}
if (!currentCallStatus.equals(CallStatus.LEAVING)) {
hangup(true);
}
@ -1722,14 +1730,6 @@ public class CallActivity extends CallBaseActivity {
endPeerConnection(sessionId, false);
}
if (localStream != null) {
localStream.dispose();
localStream = null;
Log.d(TAG, "Disposed localStream");
} else {
Log.d(TAG, "localStream is null");
}
hangupNetworkCalls(shutDownView);
ApplicationWideCurrentRoomHolder.getInstance().setInCall(false);
}