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 (mMediaScanner != null) mMediaScanner.destroy();
if (mAudioManager != null) mAudioManager.destroy(); if (mAudioManager != null) mAudioManager.destroy();
try { if (mTimer != null) mTimer.cancel();
mTimer.cancel(); if (mAutoAnswerTimer != null) mAutoAnswerTimer.cancel();
if (mAutoAnswerTimer != null) mAutoAnswerTimer.cancel();
if (mCore != null) {
destroyCore(); destroyCore();
} catch (RuntimeException e) {
Log.e("[Manager] Destroy Core Runtime Exception: " + e);
} finally {
mCore = null; mCore = null;
} }
} }