diff --git a/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java b/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java
index 1aef98afc..7c4024fe0 100644
--- a/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java
@@ -1,6 +1,7 @@
package eu.siacs.conversations.ui;
import android.content.Intent;
+import android.content.res.ColorStateList;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.util.Log;
@@ -47,9 +48,6 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
;
Log.d(Config.LOGTAG, "RtpSessionActivity.onCreate()");
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_rtp_session);
- this.binding.rejectCall.setOnClickListener(this::rejectCall);
- this.binding.endCall.setOnClickListener(this::endCall);
- this.binding.acceptCall.setOnClickListener(this::acceptCall);
}
@Override
@@ -166,14 +164,20 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
break;
case DECLINED_OR_BUSY:
binding.status.setText(R.string.rtp_state_declined_or_busy);
+ case CONNECTIVITY_ERROR:
+ binding.status.setText(R.string.rtp_state_connectivity_error);
break;
}
}
private void updateButtonConfiguration(final RtpEndUserState state) {
if (state == RtpEndUserState.INCOMING_CALL) {
+ this.binding.rejectCall.setOnClickListener(this::rejectCall);
+ this.binding.rejectCall.setImageResource(R.drawable.ic_call_end_white_48dp);
this.binding.rejectCall.show();
this.binding.endCall.hide();
+ this.binding.acceptCall.setOnClickListener(this::acceptCall);
+ this.binding.acceptCall.setImageResource(R.drawable.ic_call_white_48dp);
this.binding.acceptCall.show();
} else if (state == RtpEndUserState.ENDING_CALL) {
this.binding.rejectCall.hide();
@@ -181,19 +185,31 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
this.binding.acceptCall.hide();
} else if (state == RtpEndUserState.DECLINED_OR_BUSY) {
this.binding.rejectCall.hide();
+ this.binding.endCall.setOnClickListener(this::exit);
this.binding.endCall.setImageResource(R.drawable.ic_clear_white_48dp);
this.binding.endCall.show();
- this.binding.endCall.setOnClickListener(this::exit);
this.binding.acceptCall.hide();
+ } else if (state == RtpEndUserState.CONNECTIVITY_ERROR) {
+ this.binding.rejectCall.setOnClickListener(this::exit);
+ this.binding.rejectCall.setImageResource(R.drawable.ic_clear_white_48dp);
+ this.binding.rejectCall.show();
+ this.binding.endCall.hide();
+ this.binding.acceptCall.setOnClickListener(this::retry);
+ this.binding.acceptCall.setImageResource(R.drawable.ic_replay_white_48dp);
+ this.binding.acceptCall.show();
} else {
this.binding.rejectCall.hide();
+ this.binding.endCall.setOnClickListener(this::endCall);
this.binding.endCall.setImageResource(R.drawable.ic_call_end_white_48dp);
this.binding.endCall.show();
- this.binding.endCall.setOnClickListener(this::endCall);
this.binding.acceptCall.hide();
}
}
+ private void retry(View view) {
+
+ }
+
private void exit(View view) {
finish();
}
diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java
index f7d79771e..f8e7947b7 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/WebRTCWrapper.java
@@ -14,6 +14,7 @@ import org.webrtc.AudioTrack;
import org.webrtc.Camera1Capturer;
import org.webrtc.Camera1Enumerator;
import org.webrtc.CameraVideoCapturer;
+import org.webrtc.CandidatePairChangeEvent;
import org.webrtc.DataChannel;
import org.webrtc.IceCandidate;
import org.webrtc.MediaConstraints;
@@ -58,6 +59,12 @@ public class WebRTCWrapper {
}
+ @Override
+ public void onSelectedCandidatePairChanged(CandidatePairChangeEvent event) {
+ Log.d(Config.LOGTAG, "remote candidate selected: " + event.remote);
+ Log.d(Config.LOGTAG, "local candidate selected: " + event.local);
+ }
+
@Override
public void onIceConnectionReceivingChange(boolean b) {
diff --git a/src/main/res/drawable-hdpi/ic_replay_white_48dp.png b/src/main/res/drawable-hdpi/ic_replay_white_48dp.png
new file mode 100644
index 000000000..fcddcf02d
Binary files /dev/null and b/src/main/res/drawable-hdpi/ic_replay_white_48dp.png differ
diff --git a/src/main/res/drawable-mdpi/ic_replay_white_48dp.png b/src/main/res/drawable-mdpi/ic_replay_white_48dp.png
new file mode 100644
index 000000000..3b4191325
Binary files /dev/null and b/src/main/res/drawable-mdpi/ic_replay_white_48dp.png differ
diff --git a/src/main/res/drawable-xhdpi/ic_replay_white_48dp.png b/src/main/res/drawable-xhdpi/ic_replay_white_48dp.png
new file mode 100644
index 000000000..1573fb111
Binary files /dev/null and b/src/main/res/drawable-xhdpi/ic_replay_white_48dp.png differ
diff --git a/src/main/res/drawable-xxhdpi/ic_replay_white_48dp.png b/src/main/res/drawable-xxhdpi/ic_replay_white_48dp.png
new file mode 100644
index 000000000..5105c2251
Binary files /dev/null and b/src/main/res/drawable-xxhdpi/ic_replay_white_48dp.png differ
diff --git a/src/main/res/drawable-xxxhdpi/ic_replay_white_48dp.png b/src/main/res/drawable-xxxhdpi/ic_replay_white_48dp.png
new file mode 100644
index 000000000..04cbde9af
Binary files /dev/null and b/src/main/res/drawable-xxxhdpi/ic_replay_white_48dp.png differ
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 0a1d6f78c..487ee434b 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -897,6 +897,7 @@
Locating devices
Ringing
Busy
+ Unable to connect call
- View %1$d Participant
- View %1$d Participants