Chromium Code Reviews| Index: webrtc/modules/utility/include/jvm_android.h |
| diff --git a/webrtc/modules/utility/include/jvm_android.h b/webrtc/modules/utility/include/jvm_android.h |
| index 51a0bd841a12d27a9d3af892e6a899659ba23dc3..43ed84f06959d62b63dff03dfac8cdf5a58aa104 100644 |
| --- a/webrtc/modules/utility/include/jvm_android.h |
| +++ b/webrtc/modules/utility/include/jvm_android.h |
| @@ -118,8 +118,7 @@ class JNIEnvironment { |
| // JNIEnv* jni = ::base::android::AttachCurrentThread(); |
| // JavaVM* jvm = NULL; |
| // jni->GetJavaVM(&jvm); |
| -// jobject context = ::base::android::GetApplicationContext(); |
| -// webrtc::JVM::Initialize(jvm, context); |
| +// webrtc::JVM::Initialize(jvm); |
| // |
| // // Header (.h) file of example class called User. |
| // std::unique_ptr<JNIEnvironment> env; |
| @@ -145,8 +144,11 @@ class JNIEnvironment { |
| // JVM::Uninitialize(); |
| class JVM { |
| public: |
| - // Stores global handles to the Java VM interface and the application context. |
| + // Stores global handles to the Java VM interface. |
| // Should be called once on a thread that is attached to the JVM. |
| + static void Initialize(JavaVM* jvm); |
| + // TODO(sakal): Remove once downstream dependencies have been updated. |
| + // Deprecated old signature with Android context. |
|
henrika_webrtc
2017/05/26 08:34:56
Nit, deprecate.
sakal
2017/05/26 08:49:33
Done.
|
| static void Initialize(JavaVM* jvm, jobject context); |
| // Clears handles stored in Initialize(). Must be called on same thread as |
| // Initialize(). |
| @@ -168,10 +170,9 @@ class JVM { |
| // TODO(henrika): can we make these private? |
| JavaVM* jvm() const { return jvm_; } |
| - jobject context() const { return context_; } |
| protected: |
| - JVM(JavaVM* jvm, jobject context); |
| + JVM(JavaVM* jvm); |
| ~JVM(); |
| private: |
| @@ -179,7 +180,6 @@ class JVM { |
| rtc::ThreadChecker thread_checker_; |
| JavaVM* const jvm_; |
| - jobject context_; |
| }; |
| } // namespace webrtc |