summaryrefslogtreecommitdiff
path: root/platform/android/src/image.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2018-08-22 12:27:43 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2018-09-06 17:26:28 -0700
commit9cd50a891dbd320e9e4816eef4545e0a41f9ab32 (patch)
treeb424e2dcee3090d9c3f37864112d19799dd9af35 /platform/android/src/image.cpp
parent70a204924552463eaeca975a5dd28c00b21aa53d (diff)
downloadqtlocation-mapboxgl-upstream/jni.hpp-4.tar.gz
[android] jni.hpp 4.0.0upstream/jni.hpp-4
Diffstat (limited to 'platform/android/src/image.cpp')
-rw-r--r--platform/android/src/image.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/platform/android/src/image.cpp b/platform/android/src/image.cpp
index a85e9aeaa2..31515ff16f 100644
--- a/platform/android/src/image.cpp
+++ b/platform/android/src/image.cpp
@@ -11,12 +11,11 @@ namespace mbgl {
PremultipliedImage decodeImage(const std::string& string) {
auto env{ android::AttachEnv() };
- auto array = jni::SeizeLocal(*env, jni::Array<jni::jbyte>::New(*env, string.size()));
- jni::SetArrayRegion(*env, **array, 0, string.size(),
+ auto array = jni::Array<jni::jbyte>::New(*env, string.size());
+ jni::SetArrayRegion(*env, *array, 0, string.size(),
reinterpret_cast<const signed char*>(string.data()));
- return android::Bitmap::GetImage(*env,
- *jni::SeizeLocal(*env, android::BitmapFactory::DecodeByteArray(*env, *array, 0, string.size())));
+ return android::Bitmap::GetImage(*env, android::BitmapFactory::DecodeByteArray(*env, array, 0, string.size()));
}
} // namespace mbgl