From 4fe6c3e51be77e35f40872cdbca6c80f8f8b7ecb Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Mon, 13 Sep 2010 23:17:30 -0700 Subject: Replace epoll() with poll() and rename PollLoop to Looper. As part of this change, consolidated and cleaned up the Looper API so that there are fewer distinctions between the NDK and non-NDK declarations (no need for two callback types, etc.). Removed the dependence on specific constants from sys/poll.h such as POLLIN. Instead looper.h defines events like LOOPER_EVENT_INPUT for the events that it supports. That should help make any future under-the-hood implementation changes easier. Fixed a couple of compiler warnings along the way. Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae --- include/android_runtime/android_app_NativeActivity.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/android_runtime') diff --git a/include/android_runtime/android_app_NativeActivity.h b/include/android_runtime/android_app_NativeActivity.h index fdceb84..b49e02a 100644 --- a/include/android_runtime/android_app_NativeActivity.h +++ b/include/android_runtime/android_app_NativeActivity.h @@ -18,6 +18,7 @@ #define _ANDROID_APP_NATIVEACTIVITY_H #include +#include #include @@ -69,7 +70,7 @@ public: /* Destroys the consumer and releases its input channel. */ ~AInputQueue(); - void attachLooper(ALooper* looper, int ident, ALooper_callbackFunc* callback, void* data); + void attachLooper(ALooper* looper, int ident, ALooper_callbackFunc callback, void* data); void detachLooper(); @@ -103,7 +104,7 @@ private: void wakeupDispatch(); android::InputConsumer mConsumer; - android::sp mPollLoop; + android::sp mLooper; int mDispatchKeyRead; int mDispatchKeyWrite; -- cgit v1.1