Index: media/base/media_android.cc |
diff --git a/media/base/media_android.cc b/media/base/media_android.cc |
index 4e6ffc02cf7859dbeba21445e1249509d0ad2169..8008d48fe2d01b60b2cc5b7c245103fa21bf02c7 100644 |
--- a/media/base/media_android.cc |
+++ b/media/base/media_android.cc |
@@ -6,7 +6,9 @@ |
#include <cpu-features.h> |
+#include "base/android/jni_android.h" |
#include "base/logging.h" |
+#include "media/base/android/media_jni_registrar.h" |
namespace media { |
@@ -22,6 +24,9 @@ bool InitializeMediaLibrary(const base::FilePath& module_dir) { |
} |
void InitializeMediaLibraryForTesting() { |
+ // Register JNI bindings for android. |
+ JNIEnv* env = base::android::AttachCurrentThread(); |
+ RegisterJni(env); |
} |
bool IsMediaLibraryInitialized() { |