Remove old code which break AEC software in some cases

This commit is contained in:
Erwan Croze 2017-01-27 11:58:17 +01:00
parent 762ef34d4e
commit 4ce4a2a869
2 changed files with 1 additions and 19 deletions

View file

@ -763,6 +763,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
private synchronized void initLiblinphone(LinphoneCore lc) throws LinphoneCoreException {
mLc = lc;
PreferencesMigrator prefMigrator = new PreferencesMigrator(mServiceContext);
prefMigrator.migrateRemoteProvisioningUriIfNeeded();
prefMigrator.migrateSharingServerUrlIfNeeded();
@ -772,14 +773,6 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
prefMigrator.doMigration();
}
// Some devices could be using software AEC before
// This will disable it in favor of hardware AEC if available
if (prefMigrator.isEchoMigratioNeeded()) {
Log.d("Echo canceller configuration need to be updated");
prefMigrator.doEchoMigration();
mPrefs.echoConfigurationUpdated();
}
mLc.setZrtpSecretsCache(basePath + "/zrtp_secrets");
try {

View file

@ -59,17 +59,6 @@ public class PreferencesMigrator {
return (!lc.needsEchoCalibration() && mNewPrefs.isEchoCancellationEnabled());
}
public void doEchoMigration() {
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
if (lc == null) {
return;
}
if (!lc.needsEchoCalibration()) {
mNewPrefs.setEchoCancellation(false);
}
}
public boolean isMigrationNeeded() {
int accountNumber = mOldPrefs.getInt(getString(R.string.pref_extra_accounts), -1);
return accountNumber != -1;