Index: webrtc/sdk/android/api/org/webrtc/PeerConnectionFactory.java |
diff --git a/webrtc/sdk/android/api/org/webrtc/PeerConnectionFactory.java b/webrtc/sdk/android/api/org/webrtc/PeerConnectionFactory.java |
index 28b3ca72ab9b98e4f74db5d2a7f80bf3955cfc18..b7d85f04e3fc230d56c1fa5943be49d62e6160ca 100644 |
--- a/webrtc/sdk/android/api/org/webrtc/PeerConnectionFactory.java |
+++ b/webrtc/sdk/android/api/org/webrtc/PeerConnectionFactory.java |
@@ -10,6 +10,7 @@ |
package org.webrtc; |
+import android.content.Context; |
import java.util.List; |
/** |
@@ -30,6 +31,7 @@ public class PeerConnectionFactory { |
private static final String TAG = "PeerConnectionFactory"; |
private final long nativeFactory; |
+ private static Context applicationContext; |
private static Thread networkThread; |
private static Thread workerThread; |
private static Thread signalingThread; |
@@ -52,14 +54,19 @@ public class PeerConnectionFactory { |
// Must be called at least once before creating a PeerConnectionFactory |
// (for example, at application startup time). |
- public static native void initializeAndroidGlobals( |
- android.content.Context context, boolean videoHwAcceleration); |
+ public static native void nativeInitializeAndroidGlobals( |
+ Context context, boolean videoHwAcceleration); |
+ |
+ public static void initializeAndroidGlobals(Context context, boolean videoHwAcceleration) { |
+ ContextUtils.initialize(context); |
+ nativeInitializeAndroidGlobals(context, videoHwAcceleration); |
+ } |
// Older signature of initializeAndroidGlobals. The extra parameters are now meaningless. |
@Deprecated |
public static boolean initializeAndroidGlobals(Object context, boolean initializeAudio, |
boolean initializeVideo, boolean videoHwAcceleration) { |
- initializeAndroidGlobals((android.content.Context) context, videoHwAcceleration); |
+ initializeAndroidGlobals((Context) context, videoHwAcceleration); |
return true; |
} |