mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-14 06:10:40 +01:00
Move InitClassLoader from JNI_OnLoad to InitGlobalJniVariables.
This fixes clients with custom JNI_OnLoad code. Bug: webrtc:8278 Change-Id: I67b45c2ca07b13b0bf968c5ac17ec6f1bcc58a86 Reviewed-on: https://webrtc-review.googlesource.com/21281 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20629}
This commit is contained in:
parent
c241af9cca
commit
b3a8c980f7
2 changed files with 3 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
#include "sdk/android/src/jni/class_loader.h"
|
||||
#include "sdk/android/src/jni/classreferenceholder.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
@ -78,6 +79,8 @@ jint InitGlobalJniVariables(JavaVM *jvm) {
|
|||
if (jvm->GetEnv(reinterpret_cast<void**>(&jni), JNI_VERSION_1_6) != JNI_OK)
|
||||
return -1;
|
||||
|
||||
InitClassLoader(jni);
|
||||
|
||||
return JNI_VERSION_1_6;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,8 +28,6 @@ extern "C" jint JNIEXPORT JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved) {
|
|||
|
||||
RTC_CHECK(rtc::InitializeSSL()) << "Failed to InitializeSSL()";
|
||||
LoadGlobalClassReferenceHolder();
|
||||
JNIEnv* env = AttachCurrentThreadIfNeeded();
|
||||
InitClassLoader(env);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue