diff options
Diffstat (limited to 'src/libjvm-android.c')
-rw-r--r-- | src/libjvm-android.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libjvm-android.c b/src/libjvm-android.c new file mode 100644 index 0000000..ddf3be5 --- /dev/null +++ b/src/libjvm-android.c @@ -0,0 +1,17 @@ +#include <assert.h> +#include "jvm/jni.h" + +jstring +android_content_Context_getPackageName(JNIEnv *env, jobject object, va_list args) +{ + assert(env && object); + return (*env)->NewStringUTF(env, "com.gnu.linux"); +} + +jstring +android_content_context_getPackageName(JNIEnv *env, jobject object, va_list args) +{ + // Probably bug in unity, call to lowercase context class, but works due to case-insensitive filesystem. + // <https://stackoverflow.com/questions/10890805/case-sensitivity-of-java-class-names> + return android_content_Context_getPackageName(env, object, args); +} |