From 53c3c327f0ebea276d977f58a59cdb9449165518 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 17 Aug 2018 13:43:07 -0700 Subject: [android] Upgrade to latest jni.hpp --- platform/android/src/graphics/rectf.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'platform/android/src/graphics/rectf.cpp') diff --git a/platform/android/src/graphics/rectf.cpp b/platform/android/src/graphics/rectf.cpp index 1b375dad18..9f05728b4c 100644 --- a/platform/android/src/graphics/rectf.cpp +++ b/platform/android/src/graphics/rectf.cpp @@ -4,32 +4,32 @@ namespace mbgl { namespace android { float RectF::getLeft(jni::JNIEnv& env, jni::Object rectf) { - static auto field = RectF::javaClass.GetField(env, "left"); + static auto javaClass = jni::Class::Singleton(env); + static auto field = javaClass.GetField(env, "left"); return rectf.Get(env, field); } float RectF::getTop(jni::JNIEnv& env, jni::Object rectf) { - static auto field = RectF::javaClass.GetField(env, "top"); + static auto javaClass = jni::Class::Singleton(env); + static auto field = javaClass.GetField(env, "top"); return rectf.Get(env, field); } float RectF::getRight(jni::JNIEnv& env, jni::Object rectf) { - static auto field = RectF::javaClass.GetField(env, "right"); + static auto javaClass = jni::Class::Singleton(env); + static auto field = javaClass.GetField(env, "right"); return rectf.Get(env, field); } float RectF::getBottom(jni::JNIEnv& env, jni::Object rectf) { - static auto field = RectF::javaClass.GetField(env, "bottom"); + static auto javaClass = jni::Class::Singleton(env); + static auto field = javaClass.GetField(env, "bottom"); return rectf.Get(env, field); } void RectF::registerNative(jni::JNIEnv& env) { - // Lookup the class - RectF::javaClass = *jni::Class::Find(env).NewGlobalRef(env).release(); + jni::Class::Singleton(env); } -jni::Class RectF::javaClass; - - } // namespace android } // namespace mbgl \ No newline at end of file -- cgit v1.2.1