Reland of Removes usage of native base::android::GetApplicationContext()

The change is now compatible with the old JVM::Initialize API. The
context is passed to the ContextUtils class when calling its deprecated
signature.

BUG=webrtc:7665
NOTRY=True # Only comment changes since the last patchset.

Review-Url: https://codereview.webrtc.org/2903253004
Cr-Commit-Position: refs/heads/master@{#18268}
This commit is contained in:
sakal
2017-05-26 01:51:53 -07:00
committed by Commit bot
parent 13ae11a418
commit d7fdb8014d
18 changed files with 196 additions and 54 deletions

View File

@ -1139,7 +1139,7 @@ JOW(jlong, PeerConnectionFactory_nativeCreateObserver)(
return (jlong)new PCOJava(jni, j_observer);
}
JOW(void, PeerConnectionFactory_initializeAndroidGlobals)
JOW(void, PeerConnectionFactory_nativeInitializeAndroidGlobals)
(JNIEnv* jni,
jclass,
jobject context,
@ -1149,7 +1149,7 @@ JOW(void, PeerConnectionFactory_initializeAndroidGlobals)
if (!factory_static_initialized) {
RTC_DCHECK(j_application_context == nullptr);
j_application_context = NewGlobalRef(jni, context);
webrtc::JVM::Initialize(GetJVM(), context);
webrtc::JVM::Initialize(GetJVM());
factory_static_initialized = true;
}
}