From efcb0981b37e8cfb878cec8ca0117efa1ce41541 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Fri, 3 Oct 2025 17:23:19 +0200 Subject: [PATCH] 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 --- folio-daemon/main.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/folio-daemon/main.cpp b/folio-daemon/main.cpp index b1b6887..7522f5c 100644 --- a/folio-daemon/main.cpp +++ b/folio-daemon/main.cpp @@ -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; } }