diff options
author | Andreas Huber <andih@google.com> | 2014-02-13 17:22:33 +0000 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2014-02-13 17:22:33 +0000 |
commit | 9ae000ca8c05ad6f700ad7bf119bbc92fb964b57 (patch) | |
tree | 39535e468bacaef05410d512d0794c41d27f8181 /include/android_runtime/AndroidRuntime.h | |
parent | 7825334929b098b36e1144872200e75ba6d24b13 (diff) | |
download | frameworks_base-9ae000ca8c05ad6f700ad7bf119bbc92fb964b57.zip frameworks_base-9ae000ca8c05ad6f700ad7bf119bbc92fb964b57.tar.gz frameworks_base-9ae000ca8c05ad6f700ad7bf119bbc92fb964b57.tar.bz2 |
Revert "Split AndroidRuntime into AndroidRuntimeBase base-class and the rest."
This reverts commit 7825334929b098b36e1144872200e75ba6d24b13.
Change-Id: I1702eb3ff9d7192d64039c8bf4bc3fc5d8e458c4
Diffstat (limited to 'include/android_runtime/AndroidRuntime.h')
-rw-r--r-- | include/android_runtime/AndroidRuntime.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/include/android_runtime/AndroidRuntime.h b/include/android_runtime/AndroidRuntime.h index efd92bb..0b3ce9a 100644 --- a/include/android_runtime/AndroidRuntime.h +++ b/include/android_runtime/AndroidRuntime.h @@ -19,8 +19,6 @@ #ifndef _RUNTIME_ANDROID_RUNTIME_H #define _RUNTIME_ANDROID_RUNTIME_H -#include "AndroidRuntimeBase.h" - #include <utils/Errors.h> #include <binder/IBinder.h> #include <utils/String8.h> @@ -33,7 +31,7 @@ namespace android { -class AndroidRuntime : public AndroidRuntimeBase +class AndroidRuntime { public: AndroidRuntime(); @@ -47,6 +45,12 @@ public: }; /** + * Register a set of methods in the specified class. + */ + static int registerNativeMethods(JNIEnv* env, + const char* className, const JNINativeMethod* gMethods, int numMethods); + + /** * Call a class's static main method with the given arguments, */ status_t callMain(const char* className, jclass clazz, int argc, @@ -100,6 +104,12 @@ public: static android_thread_id_t createJavaThread(const char* name, void (*start)(void *), void* arg); + /** return a pointer to the VM running in this process */ + static JavaVM* getJavaVM() { return mJavaVM; } + + /** return a pointer to the JNIEnv pointer for this thread */ + static JNIEnv* getJNIEnv(); + /** return a new string corresponding to 'className' with all '.'s replaced by '/'s. */ static char* toSlashClassName(const char* className); @@ -111,6 +121,9 @@ private: Vector<JavaVMOption> mOptions; bool mExitWithoutCleanup; + /* JNI JavaVM pointer */ + static JavaVM* mJavaVM; + /* * Thread creation helpers. */ |