Add restart linphone core method
This commit is contained in:
parent
8370093c96
commit
47b76b3d43
1 changed files with 20 additions and 3 deletions
|
@ -566,9 +566,26 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
}
|
||||
}
|
||||
|
||||
public void resetLinphoneCore(Context c){
|
||||
destroyLinphoneCore(c);
|
||||
startLibLinphone(c);
|
||||
public synchronized final void destroyLinphoneCore(Context c) {
|
||||
sExited = true;
|
||||
BluetoothManager.getInstance().destroy();
|
||||
try {
|
||||
mTimer.cancel();
|
||||
mLc.destroy();
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally {
|
||||
mServiceContext.unregisterReceiver(instance.mKeepAliveReceiver);
|
||||
mLc = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void restartLinphoneCore(Context context){
|
||||
destroyLinphoneCore(context);
|
||||
startLibLinphone(context);
|
||||
sExited = true;
|
||||
}
|
||||
|
||||
private synchronized void startLibLinphone(Context c) {
|
||||
|
|
Loading…
Reference in a new issue