Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1897)

Unified Diff: webrtc/sdk/android/api/org/webrtc/PeerConnectionFactory.java

Issue 2800353002: Removing unnecessary parameters from initializeAndroidGlobals. (Closed)
Patch Set: Change type of "context" to an actual Android context. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 18cf8f796ac77a5093ee7da10282dfae9b8d23f6..ed3546f394354310a296c9840af0ffbb3575e8b0 100644
--- a/webrtc/sdk/android/api/org/webrtc/PeerConnectionFactory.java
+++ b/webrtc/sdk/android/api/org/webrtc/PeerConnectionFactory.java
@@ -50,16 +50,18 @@ public class PeerConnectionFactory {
public boolean disableNetworkMonitor;
}
- // |context| is an android.content.Context object, but we keep it untyped here
- // to allow building on non-Android platforms.
- // Callers may specify either |initializeAudio| or |initializeVideo| as false
- // to skip initializing the respective engine (and avoid the need for the
- // respective permissions).
- // |renderEGLContext| can be provided to suport HW video decoding to
- // texture and will be used to create a shared EGL context on video
- // decoding thread.
- public static native boolean initializeAndroidGlobals(Object context, boolean initializeAudio,
- boolean initializeVideo, boolean videoHwAcceleration);
+ // 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);
+
+ // Older signature of initializeAndroidGlobals. The extra parameters are now meaningless.
+ @Deprecated
+ public static boolean initializeAndroidGlobals(android.content.Context context,
+ boolean initializeAudio, boolean initializeVideo, boolean videoHwAcceleration) {
+ initializeAndroidGlobals(context, videoHwAcceleration);
+ return true;
+ }
// Field trial initialization. Must be called before PeerConnectionFactory
// is created.
@@ -90,6 +92,8 @@ public class PeerConnectionFactory {
this(null);
}
+ // Note: initializeAndroidGlobals must be called at least once before
+ // constructing a PeerConnectionFactory.
public PeerConnectionFactory(Options options) {
nativeFactory = nativeCreatePeerConnectionFactory(options);
if (nativeFactory == 0) {

Powered by Google App Engine
This is Rietveld 408576698