Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1665da55 authored by Kenny Root's avatar Kenny Root Committed by Android (Google) Code Review
Browse files

Merge "Fix poll options for NativeActivity's hasEvents"

parents 2bbe178f 2bb10f42
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -150,12 +150,12 @@ int32_t AInputQueue::hasEvents() {
    pfd[0].events = POLLIN;
    pfd[0].revents = 0;
    pfd[1].fd = mDispatchKeyRead;
    pfd[0].events = POLLIN;
    pfd[0].revents = 0;
    pfd[1].events = POLLIN;
    pfd[1].revents = 0;
    
    int nfd = poll(pfd, 2, 0);
    if (nfd <= 0) return 0;
    return (pfd[0].revents == POLLIN || pfd[1].revents == POLLIN) ? 1 : -1;
    return ((pfd[0].revents & POLLIN) || (pfd[1].revents & POLLIN)) ? 1 : -1;
}

int32_t AInputQueue::getEvent(AInputEvent** outEvent) {