mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 10:19:23 +00:00
Set the application context while creating a LinphoneCore with LinphoneFactory.createLinphoneCore(listener, context)
This commit is contained in:
parent
7787c91c46
commit
512093a3ee
2 changed files with 4 additions and 1 deletions
|
|
@ -98,7 +98,9 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
|
|||
public LinphoneCore createLinphoneCore(LinphoneCoreListener listener, Object context) throws LinphoneCoreException {
|
||||
try {
|
||||
MediastreamerAndroidContext.setContext(context);
|
||||
return new LinphoneCoreImpl(listener);
|
||||
LinphoneCore lc = new LinphoneCoreImpl(listener);
|
||||
if(context!=null) lc.setContext(context);
|
||||
return lc;
|
||||
} catch (IOException e) {
|
||||
throw new LinphoneCoreException("Cannot create LinphoneCore",e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -268,6 +268,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
return logs;
|
||||
}
|
||||
public synchronized void destroy() {
|
||||
setAndroidPowerManager(null);
|
||||
delete(nativePtr);
|
||||
nativePtr=0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue