folio-daemon: Remove unwanted event count check
No idea what was the point of it, but it prevents us from listening to sensor events when device is asleep. Change-Id: Id7ce79e8cce051256ee15d8b8f342726af085976
This commit is contained in:
@@ -118,7 +118,6 @@ int main(void) {
|
||||
|
||||
// Polling loop
|
||||
while (ALooper_pollOnce(-1, NULL, NULL, NULL) > ALOOPER_POLL_TIMEOUT) {
|
||||
int eventCount = 0;
|
||||
ASensorEvent sensorEvent;
|
||||
while (ASensorEventQueue_getEvents(eventQueue, &sensorEvent, 1) > 0) {
|
||||
// 0 means closed; 1 means open
|
||||
@@ -144,12 +143,6 @@ int main(void) {
|
||||
}
|
||||
|
||||
ALOGI("Sent lid %s event", isClosed ? "closed" : "open");
|
||||
eventCount++;
|
||||
}
|
||||
|
||||
if (eventCount == 0) {
|
||||
ALOGE("Poll returned with zero events: %s", strerror(errno));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user