getMedia() would throw null pointer when called after going from proposed to some error state
This commit is contained in:
parent
ea2ed85ed7
commit
e545e95d39
|
@ -92,8 +92,8 @@ android {
|
|||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
versionCode 369
|
||||
versionName "2.8.0-alpha.3"
|
||||
versionCode 370
|
||||
versionName "2.8.0-alpha.4"
|
||||
archivesBaseName += "-$versionName"
|
||||
applicationId "eu.siacs.conversations"
|
||||
resValue "string", "applicationId", applicationId
|
||||
|
|
|
@ -659,7 +659,6 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
|
|||
final AbstractJingleConnection.Id id = requireRtpConnection().getId();
|
||||
if (account == id.account && id.with.equals(with) && id.sessionId.equals(sessionId)) {
|
||||
if (state == RtpEndUserState.ENDED) {
|
||||
resetIntent(account, with, state, requireRtpConnection().getMedia());
|
||||
finish();
|
||||
return;
|
||||
} else if (END_CARD.contains(state)) {
|
||||
|
|
|
@ -758,7 +758,12 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
|||
if (isInState(State.PROPOSED, State.PROCEED)) {
|
||||
return Preconditions.checkNotNull(this.proposedMedia, "RTP connection has not been initialized properly");
|
||||
}
|
||||
return Preconditions.checkNotNull(initiatorRtpContentMap.getMedia());
|
||||
final RtpContentMap initiatorContentMap = initiatorRtpContentMap;
|
||||
if (initiatorContentMap != null) {
|
||||
return initiatorContentMap.getMedia();
|
||||
} else {
|
||||
return Preconditions.checkNotNull(this.proposedMedia, "RTP connection has not been initialized properly");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue