#include <android/looper.h>
#include <utils/Looper.h>
+#include <binder/IPCThreadState.h>
using android::Looper;
using android::sp;
+using android::IPCThreadState;
ALooper* ALooper_forThread() {
return Looper::getForThread().get();
return ALOOPER_POLL_ERROR;
}
+ IPCThreadState::self()->flushCommands();
return looper->pollOnce(timeoutMillis, outFd, outEvents, outData);
}
LOGE("ALooper_pollAll: No looper for this thread!");
return ALOOPER_POLL_ERROR;
}
-
+
+ IPCThreadState::self()->flushCommands();
return looper->pollAll(timeoutMillis, outFd, outEvents, outData);
}