Use new Core.stop() method
This commit is contained in:
parent
1ee8e83621
commit
460640d59e
2 changed files with 3 additions and 11 deletions
|
@ -686,9 +686,8 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou
|
||||||
}
|
}
|
||||||
|
|
||||||
public void restartCore() {
|
public void restartCore() {
|
||||||
destroyCore();
|
mCore.stop();
|
||||||
startLibLinphone(mServiceContext, false);
|
mCore.start();
|
||||||
sExited = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void startLibLinphone(Context c, boolean isPush) {
|
private synchronized void startLibLinphone(Context c, boolean isPush) {
|
||||||
|
@ -877,7 +876,7 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou
|
||||||
mCore.setNetworkReachable(false);
|
mCore.setNetworkReachable(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mCore = null;
|
mCore.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enableProximitySensing(boolean enable) {
|
public void enableProximitySensing(boolean enable) {
|
||||||
|
|
|
@ -425,13 +425,6 @@ public final class LinphoneService extends Service {
|
||||||
|
|
||||||
sInstance = null;
|
sInstance = null;
|
||||||
LinphoneManager.destroy();
|
LinphoneManager.destroy();
|
||||||
// The following are required if we want for the Core's finalize() method to be called
|
|
||||||
// before the super.onDestroy() call.
|
|
||||||
// We have to so there are no more ref on the native LinphoneCore object and thus call
|
|
||||||
// it's uninit() method which will free the AndroidPlatformHelper resources...
|
|
||||||
// Problem is both the below methods do not guaranty the finalize will be called in time...
|
|
||||||
// System.gc();
|
|
||||||
// System.runFinalization();
|
|
||||||
|
|
||||||
// Make sure our notification is gone.
|
// Make sure our notification is gone.
|
||||||
mNotificationManager.destroy();
|
mNotificationManager.destroy();
|
||||||
|
|
Loading…
Reference in a new issue