summaryrefslogtreecommitdiffstats
path: root/services/inputflinger/EventHub.cpp
diff options
context:
space:
mode:
authorTim Kilbourn <tkilbourn@google.com>2015-03-26 14:12:42 -0700
committerTim Kilbourn <tkilbourn@google.com>2015-03-26 14:12:42 -0700
commit3447df165f53d76791221531b769801741cfe04a (patch)
treeeb5924d1cc793f8cbe75191d1ae7949e294be5c0 /services/inputflinger/EventHub.cpp
parent5b20fd0882e6a1754cad7342f7ceda3753e8f567 (diff)
downloadframeworks_native-3447df165f53d76791221531b769801741cfe04a.zip
frameworks_native-3447df165f53d76791221531b769801741cfe04a.tar.gz
frameworks_native-3447df165f53d76791221531b769801741cfe04a.tar.bz2
Use EPOLLWAKEUP properly.
We were trying to use it only when it wasn't supported. Bug: 19937342 Change-Id: Id35aef9ad84f101f7ada2eb87fb91e5c5e2b3357
Diffstat (limited to 'services/inputflinger/EventHub.cpp')
-rw-r--r--services/inputflinger/EventHub.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/inputflinger/EventHub.cpp b/services/inputflinger/EventHub.cpp
index 93ce010..3135692 100644
--- a/services/inputflinger/EventHub.cpp
+++ b/services/inputflinger/EventHub.cpp
@@ -1293,7 +1293,10 @@ status_t EventHub::openDeviceLocked(const char *devicePath) {
// Register with epoll.
struct epoll_event eventItem;
memset(&eventItem, 0, sizeof(eventItem));
- eventItem.events = mUsingEpollWakeup ? EPOLLIN : EPOLLIN | EPOLLWAKEUP;
+ eventItem.events = EPOLLIN;
+ if (mUsingEpollWakeup) {
+ eventItem.events |= EPOLLWAKEUP;
+ }
eventItem.data.u32 = deviceId;
if (epoll_ctl(mEpollFd, EPOLL_CTL_ADD, fd, &eventItem)) {
ALOGE("Could not add device fd to epoll instance. errno=%d", errno);