aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/android/jni/Context.cpp18
-rw-r--r--xbmc/android/jni/Context.h3
2 files changed, 21 insertions, 0 deletions
diff --git a/xbmc/android/jni/Context.cpp b/xbmc/android/jni/Context.cpp
index f7b13d05e8..defa2be1cf 100644
--- a/xbmc/android/jni/Context.cpp
+++ b/xbmc/android/jni/Context.cpp
@@ -37,6 +37,12 @@
#include "ConnectivityManager.h"
#include "AudioManager.h"
#include "Surface.h"
+#include "MediaCodec.h"
+#include "MediaCodecInfo.h"
+#include "MediaFormat.h"
+#include "Window.h"
+#include "View.h"
+#include "Build.h"
#include <android/native_activity.h>
@@ -73,6 +79,12 @@ void CJNIContext::PopulateStaticFields()
CJNIConnectivityManager::PopulateStaticFields();
CJNIAudioManager::PopulateStaticFields();
CJNISurface::PopulateStaticFields();
+ CJNIMediaCodec::PopulateStaticFields();
+ CJNIMediaCodecInfoCodecProfileLevel::PopulateStaticFields();
+ CJNIMediaCodecInfoCodecCapabilities::PopulateStaticFields();
+ CJNIMediaFormat::PopulateStaticFields();
+ CJNIView::PopulateStaticFields();
+ CJNIBuild::PopulateStaticFields();
}
CJNIPackageManager CJNIContext::GetPackageManager()
@@ -180,6 +192,12 @@ CJNIContentResolver CJNIContext::getContentResolver()
"getContentResolver", "()Landroid/content/ContentResolver;");
}
+CJNIWindow CJNIContext::getWindow()
+{
+ return call_method<jhobject>(m_context,
+ "getWindow", "()Landroid/view/Window;");
+}
+
void CJNIContext::_onNewIntent(JNIEnv *env, jobject context, jobject intent)
{
(void)env;
diff --git a/xbmc/android/jni/Context.h b/xbmc/android/jni/Context.h
index c577bd97b6..dcbcbf360a 100644
--- a/xbmc/android/jni/Context.h
+++ b/xbmc/android/jni/Context.h
@@ -31,6 +31,7 @@ class CJNIClassLoader;
class CJNIApplicationInfo;
class CJNIFile;
class CJNIContentResolver;
+class CJNIWindow;
class CJNIContext
{
@@ -51,6 +52,8 @@ public:
static CJNIFile getDir(const std::string &path, int mode);
static CJNIFile getExternalFilesDir(const std::string &path);
static CJNIContentResolver getContentResolver();
+ static CJNIWindow getWindow();
+
static CJNIContext* GetAppInstance() { return m_appInstance; };
static void _onNewIntent(JNIEnv *env, jobject context, jobject intent);