Android: Use ALooper_pollOnce instead of ALooper_pollAll

ALooper_pollAll is deprecated and it will be removed in NDK r27
This commit is contained in:
Olekoop 2024-07-05 20:06:48 +02:00 committed by Andrew Kaster
commit 71e1f724f6
Notes: sideshowbarker 2024-07-17 06:35:16 +09:00

View file

@ -170,7 +170,10 @@ size_t ALooperEventLoopImplementation::pump(Core::EventLoopImplementation::PumpM
auto num_events = Core::ThreadEventQueue::current().process();
int timeout_ms = mode == Core::EventLoopImplementation::PumpMode::WaitForEvents ? -1 : 0;
auto ret = ALooper_pollAll(timeout_ms, nullptr, nullptr, nullptr);
int ret;
do {
ret = ALooper_pollOnce(timeout_ms, nullptr, nullptr, nullptr);
} while (ret == ALOOPER_POLL_CALLBACK);
// We don't expect any non-callback FDs to be ready
VERIFY(ret <= 0);