diff --git a/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java b/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java
index 842811edb..0e286c8dc 100644
--- a/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java
@@ -400,7 +400,7 @@ public class RtpSessionActivity extends XmppActivity
}
} else if (asList(ACTION_MAKE_VIDEO_CALL, ACTION_MAKE_VOICE_CALL).contains(action)) {
proposeJingleRtpSession(account, with, actionToMedia(action));
- setWith(account.getRoster().getContact(with));
+ setWith(account.getRoster().getContact(with), null);
} else {
throw new IllegalStateException("received onNewIntent without sessionId");
}
@@ -424,7 +424,7 @@ public class RtpSessionActivity extends XmppActivity
}
} else if (asList(ACTION_MAKE_VIDEO_CALL, ACTION_MAKE_VOICE_CALL).contains(action)) {
proposeJingleRtpSession(account, with, actionToMedia(action));
- setWith(account.getRoster().getContact(with));
+ setWith(account.getRoster().getContact(with), null);
} else if (Intent.ACTION_VIEW.equals(action)) {
final String extraLastState = intent.getStringExtra(EXTRA_LAST_REPORTED_STATE);
final RtpEndUserState state =
@@ -437,7 +437,7 @@ public class RtpSessionActivity extends XmppActivity
updateIncomingCallScreen(state);
invalidateOptionsMenu();
}
- setWith(account.getRoster().getContact(with));
+ setWith(account.getRoster().getContact(with), state);
if (xmppConnectionService
.getJingleConnectionManager()
.fireJingleRtpConnectionStateUpdates()) {
@@ -454,13 +454,19 @@ public class RtpSessionActivity extends XmppActivity
}
}
- private void setWidth() {
- setWith(getWith());
+ private void setWidth(final RtpEndUserState state) {
+ setWith(getWith(), state);
}
- private void setWith(final Contact contact) {
+ private void setWith(final Contact contact, final RtpEndUserState state) {
binding.with.setText(contact.getDisplayName());
- binding.withJid.setText(contact.getJid().asBareJid().toEscapedString());
+ if (Arrays.asList(RtpEndUserState.INCOMING_CALL, RtpEndUserState.ACCEPTING_CALL)
+ .contains(state)) {
+ binding.withJid.setText(contact.getJid().asBareJid().toEscapedString());
+ binding.withJid.setVisibility(View.VISIBLE);
+ } else {
+ binding.withJid.setVisibility(View.GONE);
+ }
}
private void proposeJingleRtpSession(
@@ -666,7 +672,7 @@ public class RtpSessionActivity extends XmppActivity
requireRtpConnection().getState())) {
putScreenInCallMode();
}
- setWidth();
+ setWidth(currentState);
updateVideoViews(currentState);
updateStateDisplay(currentState, media);
updateVerifiedShield(verified && STATES_SHOWING_SWITCH_TO_CHAT.contains(currentState));
@@ -685,7 +691,7 @@ public class RtpSessionActivity extends XmppActivity
finish();
return;
}
- RtpEndUserState state = terminatedRtpSession.state;
+ final RtpEndUserState state = terminatedRtpSession.state;
resetIntent(account, with, terminatedRtpSession.state, terminatedRtpSession.media);
updateButtonConfiguration(state);
updateStateDisplay(state);
@@ -693,7 +699,7 @@ public class RtpSessionActivity extends XmppActivity
updateCallDuration();
updateVerifiedShield(false);
invalidateOptionsMenu();
- setWith(account.getRoster().getContact(with));
+ setWith(account.getRoster().getContact(with), state);
}
private void reInitializeActivityWithRunningRtpSession(
diff --git a/src/main/res/layout/activity_rtp_session.xml b/src/main/res/layout/activity_rtp_session.xml
index 4563d9a97..7c52cf8a2 100644
--- a/src/main/res/layout/activity_rtp_session.xml
+++ b/src/main/res/layout/activity_rtp_session.xml
@@ -53,24 +53,27 @@
android:layout_height="wrap_content"
android:layout_below="@id/status"
android:layout_marginLeft="16dp"
- android:layout_marginTop="0dp"
android:layout_marginRight="16dp"
- android:layout_marginBottom="8dp"
android:textAppearance="@style/TextAppearance.Conversations.Display2"
android:textColor="@color/white"
tools:text="Juliet Capulet" />
+
+