fix regression with screen not being put in right state

This commit is contained in:
Daniel Gultsch 2024-01-17 19:02:30 +01:00
parent 7f9d836f1a
commit d4225fcf32
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
2 changed files with 13 additions and 6 deletions

View file

@ -532,6 +532,8 @@ public class RtpSessionActivity extends XmppActivity
setWith(account.getRoster().getContact(with), null); setWith(account.getRoster().getContact(with), null);
} else if (Intent.ACTION_VIEW.equals(action)) { } else if (Intent.ACTION_VIEW.equals(action)) {
final String extraLastState = intent.getStringExtra(EXTRA_LAST_REPORTED_STATE); final String extraLastState = intent.getStringExtra(EXTRA_LAST_REPORTED_STATE);
final String lastAction = intent.getStringExtra(EXTRA_LAST_ACTION);
final Set<Media> media = actionToMedia(lastAction);
final RtpEndUserState state = final RtpEndUserState state =
extraLastState == null ? null : RtpEndUserState.valueOf(extraLastState); extraLastState == null ? null : RtpEndUserState.valueOf(extraLastState);
if (state != null) { if (state != null) {
@ -548,10 +550,13 @@ public class RtpSessionActivity extends XmppActivity
.fireJingleRtpConnectionStateUpdates()) { .fireJingleRtpConnectionStateUpdates()) {
return; return;
} }
if (END_CARD.contains(state) if (END_CARD.contains(state)) {
|| xmppConnectionService return;
.getJingleConnectionManager() }
.hasMatchingProposal(account, with)) { if (xmppConnectionService
.getJingleConnectionManager()
.hasMatchingProposal(account, with)) {
putScreenInCallMode(media);
return; return;
} }
Log.d(Config.LOGTAG, "restored state (" + state + ") was not an end card. finishing"); Log.d(Config.LOGTAG, "restored state (" + state + ") was not an end card. finishing");

View file

@ -34,7 +34,6 @@ import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.Conversational; import eu.siacs.conversations.entities.Conversational;
import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.entities.RtpSessionStatus; import eu.siacs.conversations.entities.RtpSessionStatus;
import eu.siacs.conversations.services.AppRTCAudioManager;
import eu.siacs.conversations.services.CallIntegration; import eu.siacs.conversations.services.CallIntegration;
import eu.siacs.conversations.ui.RtpSessionActivity; import eu.siacs.conversations.ui.RtpSessionActivity;
import eu.siacs.conversations.xml.Element; import eu.siacs.conversations.xml.Element;
@ -73,7 +72,10 @@ public class JingleRtpConnection extends AbstractJingleConnection
public static final List<State> STATES_SHOWING_ONGOING_CALL = public static final List<State> STATES_SHOWING_ONGOING_CALL =
Arrays.asList( Arrays.asList(
State.PROCEED, State.SESSION_INITIALIZED_PRE_APPROVED, State.SESSION_ACCEPTED); State.PROPOSED,
State.PROCEED,
State.SESSION_INITIALIZED_PRE_APPROVED,
State.SESSION_ACCEPTED);
private static final long BUSY_TIME_OUT = 30; private static final long BUSY_TIME_OUT = 30;
private final WebRTCWrapper webRTCWrapper = new WebRTCWrapper(this); private final WebRTCWrapper webRTCWrapper = new WebRTCWrapper(this);