diff --git a/res/values-FR/strings.xml b/res/values-FR/strings.xml
index acb82890b..7e42630cf 100644
--- a/res/values-FR/strings.xml
+++ b/res/values-FR/strings.xml
@@ -363,6 +363,7 @@
Appel rejeté
Utilisateur non trouvé
Paramètres média incompatibles
+ Votre correspondant à un débit faible, la vidéo ne peut démarrer
Aujourd\'hui
Hier
diff --git a/res/values/strings.xml b/res/values/strings.xml
index b29ff0ad1..874e9956d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -410,6 +410,7 @@
Call declined
User not found
Incompatible media parameters
+ Your correspondent has low bandwidth, video can\'t be started
Today
Yesterday
diff --git a/src/org/linphone/InCallActivity.java b/src/org/linphone/InCallActivity.java
index 940b6605f..475f724e5 100644
--- a/src/org/linphone/InCallActivity.java
+++ b/src/org/linphone/InCallActivity.java
@@ -51,6 +51,7 @@ import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
+import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
@@ -67,6 +68,7 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TableLayout;
import android.widget.TextView;
+import android.widget.Toast;
/**
* @author Sylvain Berfini
@@ -364,6 +366,25 @@ public class InCallActivity extends FragmentActivity implements
pauseOrResumeConference();
}
}
+
+ public void displayCustomToast(final String message, final int duration) {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ LayoutInflater inflater = getLayoutInflater();
+ View layout = inflater.inflate(R.layout.toast, (ViewGroup) findViewById(R.id.toastRoot));
+
+ TextView toastText = (TextView) layout.findViewById(R.id.toastMessage);
+ toastText.setText(message);
+
+ final Toast toast = new Toast(getApplicationContext());
+ toast.setGravity(Gravity.CENTER, 0, 0);
+ toast.setDuration(duration);
+ toast.setView(layout);
+ toast.show();
+ }
+ });
+ }
private void switchVideo(final boolean displayVideo) {
final LinphoneCall call = LinphoneManager.getLc().getCalls()[0];
@@ -381,9 +402,12 @@ public class InCallActivity extends FragmentActivity implements
showAudioView();
} else {
- LinphoneManager.getInstance().addVideo();
-
- showVideoView();
+ if (!call.getRemoteParams().isLowBandwidthEnabled()) {
+ LinphoneManager.getInstance().addVideo();
+ showVideoView();
+ } else {
+ displayCustomToast(getString(R.string.error_low_bandwidth), Toast.LENGTH_LONG);
+ }
}
}
});
diff --git a/submodules/linphone b/submodules/linphone
index 414fcf384..77ff807ee 160000
--- a/submodules/linphone
+++ b/submodules/linphone
@@ -1 +1 @@
-Subproject commit 414fcf3841ee6c3b69cb9d52b35bdf6ef97a8ef7
+Subproject commit 77ff807ee7f2c2a88cf12b8bfc49b3e51edc3cec