Fix ec calibration crash
This commit is contained in:
parent
925b839625
commit
1b970dae29
4 changed files with 14 additions and 24 deletions
|
@ -901,14 +901,7 @@ public class LinphoneManager implements LinphoneListener {
|
|||
boolean encrypted, String authenticationToken) {
|
||||
}
|
||||
|
||||
public void ecCalibrationStatus(final LinphoneCore lc,final EcCalibratorStatus status, final int delayMs,
|
||||
final Object data) {
|
||||
routeAudioToReceiver();
|
||||
EcCalibrationListener listener = (EcCalibrationListener) data;
|
||||
listener.onEcCalibrationStatus(status, delayMs);
|
||||
}
|
||||
|
||||
public void startEcCalibration(EcCalibrationListener l) throws LinphoneCoreException {
|
||||
public void startEcCalibration(LinphoneEchoCalibrationListener l) throws LinphoneCoreException {
|
||||
routeAudioToSpeaker();
|
||||
int oldVolume = mAudioManager.getStreamVolume(STREAM_VOICE_CALL);
|
||||
int maxVolume = mAudioManager.getStreamMaxVolume(STREAM_VOICE_CALL);
|
||||
|
@ -918,14 +911,6 @@ public class LinphoneManager implements LinphoneListener {
|
|||
mAudioManager.setStreamVolume(STREAM_VOICE_CALL, oldVolume, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private boolean isRinging;
|
||||
private boolean disableRinging = false;
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.linphone.LinphoneManager.EcCalibrationListener;
|
||||
import org.linphone.core.LinphoneAddress;
|
||||
import org.linphone.core.LinphoneCore;
|
||||
import org.linphone.core.LinphoneCore.AdaptiveRateAlgorithm;
|
||||
|
@ -30,6 +29,7 @@ import org.linphone.core.LinphoneCore.EcCalibratorStatus;
|
|||
import org.linphone.core.LinphoneCore.MediaEncryption;
|
||||
import org.linphone.core.LinphoneCoreException;
|
||||
import org.linphone.core.LinphoneCoreFactory;
|
||||
import org.linphone.core.LinphoneCoreListener.LinphoneEchoCalibrationListener;
|
||||
import org.linphone.core.LinphoneProxyConfig;
|
||||
import org.linphone.core.PayloadType;
|
||||
import org.linphone.mediastream.Log;
|
||||
|
@ -54,7 +54,7 @@ import android.preference.PreferenceScreen;
|
|||
/**
|
||||
* @author Sylvain Berfini
|
||||
*/
|
||||
public class SettingsFragment extends PreferencesListFragment implements EcCalibrationListener {
|
||||
public class SettingsFragment extends PreferencesListFragment implements LinphoneEchoCalibrationListener {
|
||||
private static final int WIZARD_INTENT = 1;
|
||||
private LinphonePreferences mPrefs;
|
||||
private Handler mHandler = new Handler();
|
||||
|
@ -926,7 +926,9 @@ public class SettingsFragment extends PreferencesListFragment implements EcCalib
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onEcCalibrationStatus(final EcCalibratorStatus status, final int delayMs) {
|
||||
public void ecCalibrationStatus(LinphoneCore lc, final EcCalibratorStatus status, final int delayMs, Object data) {
|
||||
LinphoneManager.getInstance().routeAudioToReceiver();
|
||||
|
||||
mHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
CheckBoxPreference echoCancellation = (CheckBoxPreference) findPreference(getString(R.string.pref_echo_cancellation_key));
|
||||
|
|
|
@ -22,11 +22,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
import java.net.URL;
|
||||
|
||||
import org.linphone.LinphoneManager;
|
||||
import org.linphone.LinphoneManager.EcCalibrationListener;
|
||||
import org.linphone.LinphonePreferences;
|
||||
import org.linphone.R;
|
||||
import org.linphone.core.LinphoneCore.EcCalibratorStatus;
|
||||
import org.linphone.core.LinphoneCore;
|
||||
import org.linphone.core.LinphoneCoreException;
|
||||
import org.linphone.core.LinphoneCoreListener.LinphoneEchoCalibrationListener;
|
||||
import org.linphone.mediastream.Log;
|
||||
|
||||
import android.os.Build;
|
||||
|
@ -44,7 +45,7 @@ import de.timroes.axmlrpc.XMLRPCServerException;
|
|||
/**
|
||||
* @author Ghislain MARY
|
||||
*/
|
||||
public class EchoCancellerCalibrationFragment extends Fragment implements EcCalibrationListener {
|
||||
public class EchoCancellerCalibrationFragment extends Fragment implements LinphoneEchoCalibrationListener {
|
||||
private Handler mHandler = new Handler();
|
||||
private boolean mSendEcCalibrationResult = false;
|
||||
|
||||
|
@ -63,14 +64,16 @@ public class EchoCancellerCalibrationFragment extends Fragment implements EcCali
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onEcCalibrationStatus(EcCalibratorStatus status, int delayMs) {
|
||||
public void ecCalibrationStatus(LinphoneCore lc,LinphoneCore.EcCalibratorStatus status, int delay_ms, Object data) {
|
||||
LinphoneManager.getInstance().routeAudioToReceiver();
|
||||
|
||||
if (status == EcCalibratorStatus.DoneNoEcho) {
|
||||
LinphonePreferences.instance().setEchoCancellation(false);
|
||||
} else if ((status == EcCalibratorStatus.Done) || (status == EcCalibratorStatus.Failed)) {
|
||||
LinphonePreferences.instance().setEchoCancellation(true);
|
||||
}
|
||||
if (mSendEcCalibrationResult) {
|
||||
sendEcCalibrationResult(status, delayMs);
|
||||
sendEcCalibrationResult(status, delay_ms);
|
||||
} else {
|
||||
SetupActivity.instance().isEchoCalibrationFinished();
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 4ebc9c85b954fd0e993a3f7e8890ae190fd8a79e
|
||||
Subproject commit f3c7c993eacd8f9eccb8088e53875ccbd50f346b
|
Loading…
Reference in a new issue