null reference to rtpconnection when end card is reached

this will make re-init work if for example retry end card had been reached and we get another call
This commit is contained in:
Daniel Gultsch 2020-04-24 21:27:00 +02:00
parent 07ba70aef7
commit a5beaaed9d

View file

@ -766,8 +766,6 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
if (state == RtpEndUserState.ENDED) { if (state == RtpEndUserState.ENDED) {
finish(); finish();
return; return;
} else if (END_CARD.contains(state)) {
resetIntent(account, with, state, requireRtpConnection().getMedia());
} }
runOnUiThread(() -> { runOnUiThread(() -> {
updateStateDisplay(state); updateStateDisplay(state);
@ -775,9 +773,12 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
updateVideoViews(state); updateVideoViews(state);
updateProfilePicture(state); updateProfilePicture(state);
}); });
if (END_CARD.contains(state)) {
resetIntent(account, with, state, requireRtpConnection().getMedia());
this.rtpConnectionReference = null;
}
} else { } else {
Log.d(Config.LOGTAG, "received update for other rtp session"); Log.d(Config.LOGTAG, "received update for other rtp session");
//TODO if we only ever have one; we might just switch over? Maybe!
} }
} }