Remove echo limiter preference.

This commit is contained in:
Ghislain MARY 2012-10-16 09:48:15 +02:00
parent 2f99e1ba1b
commit cde0242f50
7 changed files with 2 additions and 36 deletions

View file

@ -90,7 +90,6 @@
<string name="pref_delete_account">Supprimer ce compte</string>
<string name="pref_default_account">Utiliser par défaut</string>
<string name="pref_echo_canceller_calibration">Calibration de l\'annulateur d\'écho</string>
<string name="pref_echo_limiter">Limiteur d\'écho</string>
<string name="pref_video_use_front_camera_title">Utiliser la caméra en façade</string>
<string name="pref_video">Vidéo</string>
<string name="pref_preferences">Préférences</string>
@ -162,8 +161,7 @@
<string name="error_cannot_invite_address">Impossible d\'inviter l\'adresse [%s]</string>
<string name="notification_started">démarré</string>
<string name="pref_echo_cancellation_summary">Supprime l\'écho entendu de l\'autre côté (non recommandé)</string>
<string name="pref_echo_limiter_summary">Supprime l\'écho entendu de l\'autre côté (méthode force brute)</string>
<string name="pref_echo_cancellation_summary">Supprime l\'écho entendu de l\'autre côté</string>
<string name="pref_stun_server">Serveur Stun</string>
<string name="pref_ice_enable">Activer ICE</string>
<string name="pref_ice_enable_summary">Un serveur STUN doit être configuré pour utiliser ICE</string>

View file

@ -35,7 +35,6 @@
<string name="pref_transport_use_standard_ports_key">pref_transport_use_standard_ports_key</string>
<string name="pref_echo_canceller_calibration_key">pref_echo_canceller_calibration_key</string>
<string name="pref_echo_limiter_key">pref_echo_limiter_key</string>
<string name="pref_prefix_key">pref_prefix_key</string>
<string name="pref_proxy_key">pref_proxy_key</string>
<string name="pref_domain_key">pref_domain_key</string>

View file

@ -110,7 +110,6 @@
<string name="pref_delete_account">Delete this account</string>
<string name="pref_default_account">Use as default</string>
<string name="pref_echo_canceller_calibration">Echo canceller calibration</string>
<string name="pref_echo_limiter">Echo limiter</string>
<string name="pref_video_use_front_camera_title">Use front camera</string>
<string name="pref_video">Video</string>
<string name="pref_preferences">Preferences</string>
@ -209,8 +208,7 @@
<string name="error_cannot_invite_address">Cannot invite destination address [%s]</string>
<string name="notification_started">started</string>
<string name="pref_echo_cancellation_summary">Removes the echo heard by other end (not recommended)</string>
<string name="pref_echo_limiter_summary">Removes the echo heard by other end (brute force method)</string>
<string name="pref_echo_cancellation_summary">Removes the echo heard by other end</string>
<string name="pref_stun_server">Stun server</string>
<string name="pref_ice_enable">Enable ICE</string>
<string name="pref_ice_enable_summary">A STUN server must be configured to use ICE</string>

View file

@ -65,11 +65,6 @@
<PreferenceCategory
android:title="@string/pref_audio">
<CheckBoxPreference
android:key="@string/pref_echo_limiter_key"
android:title="@string/pref_echo_limiter"
android:summary="@string/pref_echo_limiter_summary"/>
<CheckBoxPreference
android:key="@string/pref_echo_cancellation_key"
android:defaultValue="false"

View file

@ -1140,10 +1140,8 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
SharedPreferences.Editor editor = prefs.edit();
if (status == EcCalibratorStatus.DoneNoEcho) {
editor.putBoolean(getString(R.string.pref_echo_limiter_key), false);
editor.putBoolean(getString(R.string.pref_echo_cancellation_key), false);
} else if ((status == EcCalibratorStatus.Done) || (status == EcCalibratorStatus.Failed)) {
editor.putBoolean(getString(R.string.pref_echo_limiter_key), false);
editor.putBoolean(getString(R.string.pref_echo_cancellation_key), true);
}
editor.commit();

View file

@ -726,9 +726,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
}
boolean useEC = getPrefBoolean(R.string.pref_echo_cancellation_key, false);
boolean useEL = getPrefBoolean(R.string.pref_echo_limiter_key, false);
mLc.enableEchoCancellation(useEC);
mLc.enableEchoLimiter(useEL);
} catch (LinphoneCoreException e) {
throw new LinphoneConfigException(getString(R.string.wrong_settings),e);
}

View file

@ -24,7 +24,6 @@ import static org.linphone.R.string.pref_codec_ilbc_key;
import static org.linphone.R.string.pref_codec_speex16_key;
import static org.linphone.R.string.pref_echo_cancellation_key;
import static org.linphone.R.string.pref_echo_canceller_calibration_key;
import static org.linphone.R.string.pref_echo_limiter_key;
import static org.linphone.R.string.pref_media_encryption_key;
import static org.linphone.R.string.pref_video_enable_key;
@ -65,7 +64,6 @@ public class PreferencesFragment extends PreferencesListFragment implements EcCa
private Handler mHandler = new Handler();
private Context mContext;
private Preference ecCalibratePref;
private CheckBoxPreference elPref;
private CheckBoxPreference ecPref;
private ListPreference mencPref;
private int nbAccounts = 1;
@ -121,7 +119,6 @@ public class PreferencesFragment extends PreferencesListFragment implements EcCa
}
});
ecPref = (CheckBoxPreference) findPreference(pref_echo_cancellation_key);
elPref = (CheckBoxPreference) findPreference(pref_echo_limiter_key);
mencPref = (ListPreference) findPreference(pref_media_encryption_key);
boolean fastCpu = Version.hasFastCpu();
@ -154,7 +151,6 @@ public class PreferencesFragment extends PreferencesListFragment implements EcCa
doOnFirstLaunch();
}
if (Hacks.hasBuiltInEchoCanceller()) {
uncheckDisableAndHideCheckbox(R.string.pref_echo_limiter_key);
uncheckDisableAndHideCheckbox(R.string.pref_echo_cancellation_key);
uncheckDisableAndHideCheckbox(R.string.pref_echo_canceller_calibration_key);
}
@ -219,23 +215,10 @@ public class PreferencesFragment extends PreferencesListFragment implements EcCa
OnPreferenceChangeListener ec_listener=new OnPreferenceChangeListener(){
public boolean onPreferenceChange(Preference arg0, Object newValue) {
Boolean val=(Boolean)newValue;
if (val){
elPref.setChecked(!val);
}
return true;
}
};
OnPreferenceChangeListener el_listener=new OnPreferenceChangeListener(){
public boolean onPreferenceChange(Preference arg0, Object newValue) {
Boolean val=(Boolean)newValue;
if (val){
ecPref.setChecked(!val);
}
return true;
}
};
ecPref.setOnPreferenceChangeListener(ec_listener);
elPref.setOnPreferenceChangeListener(el_listener);
}
private void addTransportChecboxesListener() {
@ -305,15 +288,12 @@ public class PreferencesFragment extends PreferencesListFragment implements EcCa
mHandler.post(new Runnable() {
public void run() {
if (status == EcCalibratorStatus.DoneNoEcho) {
elPref.setChecked(false);
ecPref.setChecked(false);
} else if (status == EcCalibratorStatus.Done) {
ecCalibratePref.setSummary(String.format(getString(R.string.ec_calibrated), delayMs));
elPref.setChecked(false);
ecPref.setChecked(true);
} else if (status == EcCalibratorStatus.Failed) {
ecCalibratePref.setSummary(R.string.failed);
elPref.setChecked(false);
ecPref.setChecked(true);
}
}