summaryrefslogtreecommitdiff
path: root/platform/android/src/run_loop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/src/run_loop.cpp')
-rw-r--r--platform/android/src/run_loop.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/platform/android/src/run_loop.cpp b/platform/android/src/run_loop.cpp
index fc45539e5e..d8c9ade3e8 100644
--- a/platform/android/src/run_loop.cpp
+++ b/platform/android/src/run_loop.cpp
@@ -1,6 +1,7 @@
#include "run_loop_impl.hpp"
#include <mbgl/util/platform.hpp>
+#include <mbgl/platform/thread.hpp>
#include <mbgl/util/thread_local.hpp>
#include <mbgl/util/thread.hpp>
#include <mbgl/util/timer.hpp>
@@ -81,8 +82,7 @@ private:
};
RunLoop::Impl::Impl(RunLoop* runLoop_, RunLoop::Type type) : runLoop(runLoop_) {
- using namespace mbgl::android;
- detach = attach_jni_thread(theJVM, &env, platform::getCurrentThreadName());
+ platform::attachThread();
loop = ALooper_prepare(0);
assert(loop);
@@ -130,8 +130,7 @@ RunLoop::Impl::~Impl() {
ALooper_release(loop);
- using namespace mbgl::android;
- detach_jni_thread(theJVM, &env, detach);
+ platform::detachThread();
}
void RunLoop::Impl::wake() {