Fix cleanups again

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-01-12 22:33:57 +01:00
parent b7539bfc12
commit 3f21d8bfbe
2 changed files with 2 additions and 4 deletions

View File

@ -1009,9 +1009,7 @@ public class CallActivity extends AppCompatActivity {
peerConnectionFactory = null; peerConnectionFactory = null;
} }
hangupNetworkCalls(); hangupNetworkCalls();
} }
} }

View File

@ -99,7 +99,7 @@ public class MagicPeerConnectionWrapper {
} }
if (peerConnection != null) { if (peerConnection != null) {
peerConnection.dispose(); peerConnection.close();
peerConnection = null; peerConnection = null;
} }
} }
@ -185,7 +185,7 @@ public class MagicPeerConnectionWrapper {
@Override @Override
public void onStateChange() { public void onStateChange() {
if (magicDataChannel.state().equals(DataChannel.State.OPEN) && if (magicDataChannel != null && magicDataChannel.state().equals(DataChannel.State.OPEN) &&
magicDataChannel.label().equals("status")) { magicDataChannel.label().equals("status")) {
sendInitialMediaStatus(); sendInitialMediaStatus();
} }