changer usage of MediastreamerAndroidContext.setContext

(cherry picked from commit 4f85b8a5d6)
This commit is contained in:
Danmei Chen 2018-04-24 09:20:27 +02:00
parent 2bbe8b9eec
commit d49fde2596

View file

@ -104,10 +104,11 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
fcontext = (Context)context;
boolean openh264DownloadEnabled = false;
if (context != null) openh264DownloadEnabled = loadingDownloadedOpenH264(fcontext);
MediastreamerAndroidContext.setContext(context);
File user = userConfig == null ? null : new File(userConfig);
File factory = factoryConfig == null ? null : new File(factoryConfig);
LinphoneCore lc = new LinphoneCoreImpl(listener, user, factory, userdata, context);
MediastreamerAndroidContext.setContext(context,lc.getMSFactory());
lc.enableDownloadOpenH264(openh264DownloadEnabled);
return lc;
} catch (IOException e) {
@ -121,8 +122,9 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
fcontext = (Context)context;
boolean openh264DownloadEnabled = false;
if (context != null) openh264DownloadEnabled = loadingDownloadedOpenH264(fcontext);
MediastreamerAndroidContext.setContext(context);
LinphoneCore lc = new LinphoneCoreImpl(listener, context);
MediastreamerAndroidContext.setContext(context,lc.getMSFactory());
lc.enableDownloadOpenH264(openh264DownloadEnabled);
return lc;
} catch (IOException e) {