diff options
Diffstat (limited to 'include/android_runtime/AndroidRuntime.h')
-rw-r--r-- | include/android_runtime/AndroidRuntime.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/include/android_runtime/AndroidRuntime.h b/include/android_runtime/AndroidRuntime.h index 22c9b72..b02a057 100644 --- a/include/android_runtime/AndroidRuntime.h +++ b/include/android_runtime/AndroidRuntime.h @@ -46,17 +46,13 @@ public: const char* className, const JNINativeMethod* gMethods, int numMethods); /** - * Call a static Java function that takes no arguments and returns void. - */ - status_t callStatic(const char* className, const char* methodName); - - /** * Call a class's static main method with the given arguments, */ - status_t callMain(const char* className, int argc, const char* const argv[]); + status_t callMain(const char* className, jclass clazz, int argc, + const char* const argv[]); /** - * Find a class, with the input either of the form + * Find a class, with the input either of the form * "package/class" or "package.class". */ static jclass findClass(JNIEnv* env, const char* className); @@ -67,7 +63,14 @@ public: void start(); // start in android.util.RuntimeInit static AndroidRuntime* getRuntime(); - + + /** + * This gets called after the VM has been created, but before we + * run any code. Override it to make any FindClass calls that need + * to use CLASSPATH. + */ + virtual void onVmCreated(JNIEnv* env); + /** * This gets called after the JavaVM has initialized. Override it * with the system's native entry point. @@ -98,6 +101,9 @@ public: /** 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); + private: static int startReg(JNIEnv* env); void parseExtraOpts(char* extraOptsBuf); @@ -112,7 +118,7 @@ private: * Thread creation helpers. */ static int javaCreateThreadEtc( - android_thread_func_t entryFunction, + android_thread_func_t entryFunction, void* userData, const char* threadName, int32_t threadPriority, @@ -121,9 +127,6 @@ private: static int javaThreadShell(void* args); }; -// Returns the Unix file descriptor for a ParcelFileDescriptor object -extern int getParcelFileDescriptorFD(JNIEnv* env, jobject object); - extern CursorWindow * get_window_from_object(JNIEnv * env, jobject javaWindow); } |