Index: base/android/jni_array.cc |
diff --git a/base/android/jni_array.cc b/base/android/jni_array.cc |
index 1bbc66997bdea1f9b7e52022287b08b90c3fec57..bc922f883c2f8c296fbbfdd4a2590afc2fb11bc9 100644 |
--- a/base/android/jni_array.cc |
+++ b/base/android/jni_array.cc |
@@ -185,6 +185,16 @@ void JavaIntArrayToIntVector(JNIEnv* env, |
env->GetIntArrayRegion(int_array, 0, len, &(*out)[0]); |
} |
+void JavaLongArrayToInt64Vector(JNIEnv* env, |
+ jlongArray long_array, |
+ std::vector<int64>* out) { |
+ DCHECK(out); |
+ std::vector<jlong> temp; |
+ JavaLongArrayToLongVector(env, long_array, &temp); |
+ out->resize(0); |
+ out->insert(out->begin(), temp.begin(), temp.end()); |
+} |
+ |
void JavaLongArrayToLongVector(JNIEnv* env, |
jlongArray long_array, |
std::vector<jlong>* out) { |