Improved LinphoneManager destroy method

This commit is contained in:
Sylvain Berfini 2019-09-27 10:24:09 +02:00
parent 053ada2833
commit 4a8c391e00

View file

@ -423,13 +423,11 @@ public class LinphoneManager implements SensorEventListener {
if (mMediaScanner != null) mMediaScanner.destroy();
if (mAudioManager != null) mAudioManager.destroy();
try {
mTimer.cancel();
if (mAutoAnswerTimer != null) mAutoAnswerTimer.cancel();
if (mTimer != null) mTimer.cancel();
if (mAutoAnswerTimer != null) mAutoAnswerTimer.cancel();
if (mCore != null) {
destroyCore();
} catch (RuntimeException e) {
Log.e("[Manager] Destroy Core Runtime Exception: " + e);
} finally {
mCore = null;
}
}