diff options
author | Nicholas Hallahan <nick@theoutpost.io> | 2015-07-16 07:50:30 -0700 |
---|---|---|
committer | Nicholas Hallahan <nick@theoutpost.io> | 2015-07-16 07:50:30 -0700 |
commit | 61cfcdb33b75a9e3d0581edf1bd3adee82b78adf (patch) | |
tree | f4bd52533a335c702880cc101f41cbf421a0f887 | |
parent | 8589cee9e28306adbfc6fffa417432ab9d9bfd95 (diff) | |
download | qtlocation-mapboxgl-61cfcdb33b75a9e3d0581edf1bd3adee82b78adf.tar.gz |
turning list into array #1716
-rw-r--r-- | android/cpp/jni.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/android/cpp/jni.cpp b/android/cpp/jni.cpp index bb815fefd6..0b5344178b 100644 --- a/android/cpp/jni.cpp +++ b/android/cpp/jni.cpp @@ -511,6 +511,19 @@ jlong JNICALL nativeAddPolyline(JNIEnv *env, jobject obj, jlong nativeMapViewPtr return -1; } + jobjectArray array = + reinterpret_cast<jobjectArray>(env->CallObjectMethod(points, listToArrayId)); + if (env->ExceptionCheck() || (array == nullptr)) { + env->ExceptionDescribe(); + return -1; + } + + jsize len = env->GetArrayLength(array); + if (len < 0) { + env->ExceptionDescribe(); + return -1; + } + return (jlong)width; } |