diff options
author | Cory Fields <theuni-nospam-@xbmc.org> | 2013-08-08 20:50:05 -0400 |
---|---|---|
committer | Cory Fields <theuni-nospam-@xbmc.org> | 2013-08-08 21:01:52 -0400 |
commit | bd43efb6a3ad99b7df672e13a39f8618a3baf929 (patch) | |
tree | bb5e858642074762b630c340f06d8b4e655bd261 | |
parent | 433f3560ef11f791993d74762e0180da1156908c (diff) |
jni: hook up new classes
-rw-r--r-- | xbmc/android/jni/Context.cpp | 18 | ||||
-rw-r--r-- | xbmc/android/jni/Context.h | 3 |
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); |