From 415d8c38199e258dfce92cdb0c69e056b3b51ef8 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Tue, 5 Oct 2010 15:35:37 -0700 Subject: Switch Looper back to using poll() instead of epoll(). Added a couple of micro-optimizations to avoid calling wake() unnecessarily and reduce JNI overhead slightly. Fixed a minor issue where we were not clearing the "next" field of Messages returned by the MessageQueue so the Message would hold on to its successor and potentially prevent the GC from collecting it if the message were leaked somehow. Change-Id: I488d29417ce0cdd7d0e447cda76ec978ef7f811c --- native/include/android/looper.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'native') diff --git a/native/include/android/looper.h b/native/include/android/looper.h index a63b744..a9d8426 100644 --- a/native/include/android/looper.h +++ b/native/include/android/looper.h @@ -135,6 +135,15 @@ enum { * to specify this event flag in the requested event set. */ ALOOPER_EVENT_HANGUP = 1 << 3, + + /** + * The file descriptor is invalid. + * For example, the file descriptor was closed prematurely. + * + * The looper always sends notifications about invalid file descriptors; it is not necessary + * to specify this event flag in the requested event set. + */ + ALOOPER_EVENT_INVALID = 1 << 4, }; /** -- cgit v1.1