Index: webrtc/modules/utility/source/jvm_android.cc |
diff --git a/webrtc/modules/utility/source/jvm_android.cc b/webrtc/modules/utility/source/jvm_android.cc |
index 9d08688700748b0fce3f0defbd3e9b7810448e60..2228d3ad255db605dfaf5ce5387fa2c2513826b8 100644 |
--- a/webrtc/modules/utility/source/jvm_android.cc |
+++ b/webrtc/modules/utility/source/jvm_android.cc |
@@ -217,10 +217,10 @@ std::string JNIEnvironment::JavaToStdString(const jstring& j_string) { |
} |
// static |
-void JVM::Initialize(JavaVM* jvm, jobject context) { |
+void JVM::Initialize(JavaVM* jvm) { |
ALOGD("JVM::Initialize%s", GetThreadInfo().c_str()); |
RTC_CHECK(!g_jvm); |
- g_jvm = new JVM(jvm, context); |
+ g_jvm = new JVM(jvm); |
} |
// static |
@@ -237,11 +237,9 @@ JVM* JVM::GetInstance() { |
return g_jvm; |
} |
-JVM::JVM(JavaVM* jvm, jobject context) |
- : jvm_(jvm) { |
+JVM::JVM(JavaVM* jvm) : jvm_(jvm) { |
ALOGD("JVM::JVM%s", GetThreadInfo().c_str()); |
RTC_CHECK(jni()) << "AttachCurrentThread() must be called on this thread."; |
- context_ = NewGlobalRef(jni(), context); |
LoadClasses(jni()); |
} |
@@ -249,7 +247,6 @@ JVM::~JVM() { |
ALOGD("JVM::~JVM%s", GetThreadInfo().c_str()); |
RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
FreeClassReferences(jni()); |
- DeleteGlobalRef(jni(), context_); |
} |
std::unique_ptr<JNIEnvironment> JVM::environment() { |