summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/android/java_glue.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index 07e4048c12..43bd841baf 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -268,11 +268,11 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) {
return ret;
};
- if (name == "java.lang.Integer") {
+ if (name == "java.lang.Integer" || name == "java.lang.Long") {
jclass nclass = env->FindClass("java/lang/Number");
- jmethodID intValue = env->GetMethodID(nclass, "intValue", "()I");
- int ret = env->CallIntMethod(obj, intValue);
+ jmethodID longValue = env->GetMethodID(nclass, "longValue", "()J");
+ jlong ret = env->CallLongMethod(obj, longValue);
return ret;
};