mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-03 13:12:01 +00:00
Fix disposing local stream when the call activity is not being left
The local stream is set only when the activity is created. However, it was disposed when hanging up, which happens not only when closing the activity, but also in cases in which the call activity is kept open and the participant reconnects to the call (for example, when starting the call times out), which caused the local stream to freeze. Now the local stream is disposed only when the call activity is destroyed. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
53e3543839
commit
6481399293
@ -1166,6 +1166,14 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
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)) {
|
if (!currentCallStatus.equals(CallStatus.LEAVING)) {
|
||||||
setCallState(CallStatus.LEAVING);
|
setCallState(CallStatus.LEAVING);
|
||||||
hangup(true);
|
hangup(true);
|
||||||
@ -1711,14 +1719,6 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
endPeerConnection(wrapper.getSessionId(), false);
|
endPeerConnection(wrapper.getSessionId(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (localStream != null) {
|
|
||||||
localStream.dispose();
|
|
||||||
localStream = null;
|
|
||||||
Log.d(TAG, "Disposed localStream");
|
|
||||||
} else {
|
|
||||||
Log.d(TAG, "localStream is null");
|
|
||||||
}
|
|
||||||
|
|
||||||
hangupNetworkCalls(shutDownView);
|
hangupNetworkCalls(shutDownView);
|
||||||
ApplicationWideCurrentRoomHolder.getInstance().setInCall(false);
|
ApplicationWideCurrentRoomHolder.getInstance().setInCall(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user