Fix issue with wizard if device has built-in aec

This commit is contained in:
Sylvain Berfini 2014-12-15 15:53:27 +01:00
parent a2c9e96dee
commit 2fc5048ccb

View file

@ -190,6 +190,7 @@ public class SetupActivity extends FragmentActivity implements OnClickListener,
private void launchEchoCancellerCalibration(boolean sendEcCalibrationResult) { private void launchEchoCancellerCalibration(boolean sendEcCalibrationResult) {
boolean needsEchoCalibration = LinphoneManager.getLc().needsEchoCalibration(); boolean needsEchoCalibration = LinphoneManager.getLc().needsEchoCalibration();
if (needsEchoCalibration && mPrefs.isFirstLaunch()) { if (needsEchoCalibration && mPrefs.isFirstLaunch()) {
mPrefs.setAccountEnabled(mPrefs.getAccountCount() - 1, false); //We'll enable it after the echo calibration
EchoCancellerCalibrationFragment fragment = new EchoCancellerCalibrationFragment(); EchoCancellerCalibrationFragment fragment = new EchoCancellerCalibrationFragment();
fragment.enableEcCalibrationResultSending(sendEcCalibrationResult); fragment.enableEcCalibrationResultSending(sendEcCalibrationResult);
changeFragment(fragment); changeFragment(fragment);
@ -341,7 +342,6 @@ public class SetupActivity extends FragmentActivity implements OnClickListener,
} }
try { try {
builder.setEnabled(false); //We'll enable it after the echo calibration
builder.saveNewAccount(); builder.saveNewAccount();
accountCreated = true; accountCreated = true;
} catch (LinphoneCoreException e) { } catch (LinphoneCoreException e) {
@ -370,7 +370,7 @@ public class SetupActivity extends FragmentActivity implements OnClickListener,
} }
public void isEchoCalibrationFinished() { public void isEchoCalibrationFinished() {
mPrefs.setAccountEnabled(0, true); mPrefs.setAccountEnabled(mPrefs.getAccountCount() - 1, true);
success(); success();
} }