Revert of Removes usage of native base::android::GetApplicationContext() (patchset #6 id:120001 of https://codereview.webrtc.org/2888093004/ )
Reason for revert:
Breaks bot on chromium.webrtc.fyi.
Original issue's description:
> Removes usage of native base::android::GetApplicationContext()
>
> BUG=webrtc:7665
>
> Review-Url: https://codereview.webrtc.org/2888093004
> Cr-Commit-Position: refs/heads/master@{#18195}
> Committed: https://chromium.googlesource.com/external/webrtc/+/bc83e2ee696ca3672b8cebd658672e95eec4e465
TBR=magjed@webrtc.org,henrika@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7665
Review-Url: https://codereview.webrtc.org/2894593002
Cr-Commit-Position: refs/heads/master@{#18196}
diff --git a/webrtc/pc/test/androidtestinitializer.cc b/webrtc/pc/test/androidtestinitializer.cc
index f070104..3f2ebd4 100644
--- a/webrtc/pc/test/androidtestinitializer.cc
+++ b/webrtc/pc/test/androidtestinitializer.cc
@@ -19,6 +19,7 @@
// Since we use Chromes build system for creating the gtest binary, this should
// be fine.
RTC_PUSH_IGNORING_WUNDEF()
+#include "base/android/context_utils.h"
#include "base/android/jni_android.h"
RTC_POP_IGNORING_WUNDEF()
@@ -40,10 +41,11 @@
JNIEnv* jni = ::base::android::AttachCurrentThread();
JavaVM* jvm = NULL;
RTC_CHECK_EQ(0, jni->GetJavaVM(&jvm));
+ jobject context = ::base::android::GetApplicationContext().obj();
RTC_CHECK(rtc::InitializeSSL()) << "Failed to InitializeSSL()";
- webrtc::JVM::Initialize(jvm);
+ webrtc::JVM::Initialize(jvm, context);
}
} // anonymous namespace