From e01ba7f0e618744a45493f734e1a2b249007e168 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 16 Oct 2012 14:53:03 +0200 Subject: [PATCH] Do not perform echo canceller calibration on first startup if the device is known to have a built-in echo canceller. --- src/org/linphone/LinphoneActivity.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java index e8b7a84f5..ce50e93c7 100644 --- a/src/org/linphone/LinphoneActivity.java +++ b/src/org/linphone/LinphoneActivity.java @@ -47,6 +47,7 @@ import org.linphone.core.LinphoneFriend; import org.linphone.core.Log; import org.linphone.core.OnlineStatus; import org.linphone.mediastream.Version; +import org.linphone.mediastream.video.capture.hwconf.Hacks; import org.linphone.setup.SetupActivity; import org.linphone.ui.AddressText; @@ -1150,11 +1151,13 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if ((requestCode == FIRST_LOGIN_ACTIVITY) && (resultCode == RESULT_OK)) { - Toast.makeText(this, getString(R.string.ec_calibration_launch_message), Toast.LENGTH_LONG).show(); - try { - LinphoneManager.getInstance().startEcCalibration(this); - } catch (LinphoneCoreException e) { - Log.e(e, "Unable to calibrate EC"); + if (!Hacks.hasBuiltInEchoCanceller()) { + Toast.makeText(this, getString(R.string.ec_calibration_launch_message), Toast.LENGTH_LONG).show(); + try { + LinphoneManager.getInstance().startEcCalibration(this); + } catch (LinphoneCoreException e) { + Log.e(e, "Unable to calibrate EC"); + } } } else if (resultCode == Activity.RESULT_FIRST_USER && requestCode == SETTINGS_ACTIVITY) {