Revert "[android] Do not create Timers on Default main loops"
This reverts commit 13cd75f099.
This commit is contained in:
@@ -80,8 +80,6 @@ RunLoop::Impl::Impl(RunLoop* runLoop_, RunLoop::Type type) : runLoop(runLoop_) {
|
||||
case Type::Default:
|
||||
ret = ALooper_addFd(loop, fds[PIPE_OUT], ALOOPER_POLL_CALLBACK,
|
||||
ALOOPER_EVENT_INPUT, looperCallbackDefault, this);
|
||||
running = true;
|
||||
isDefaultLoop = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ public:
|
||||
ALooper* loop = nullptr;
|
||||
RunLoop* runLoop = nullptr;
|
||||
util::Atomic<bool> running;
|
||||
bool isDefaultLoop = false;
|
||||
|
||||
private:
|
||||
friend RunLoop;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include <mbgl/util/run_loop.hpp>
|
||||
#include <mbgl/util/timer.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
|
||||
namespace mbgl {
|
||||
@@ -12,7 +11,6 @@ namespace util {
|
||||
class Timer::Impl : public RunLoop::Impl::Runnable {
|
||||
public:
|
||||
Impl() {
|
||||
assert(!loop->isDefaultLoop);
|
||||
loop->initRunnable(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user