Skip to content

Commit cb6e438

Browse files
OlekoopADKaster
authored andcommitted
LibCore: Don't check for Core::NotificationType::None on Android
In this section on Android it seems to loop itself for some reason As a quick hack we can just not check for Core::NotificationType::None
1 parent 76a4f84 commit cb6e438

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Userland/Libraries/LibCore/EventLoopImplementationUnix.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,11 @@ void EventLoopManagerUnix::wait_for_events(EventLoopImplementation::PumpMode mod
421421
if (error_or_marked_fd_count.value() != 0) {
422422
// Handle file system notifiers by making them normal events.
423423
for (size_t i = 1; i < thread_data.poll_fds.size(); ++i) {
424+
// FIXME: Make the check work under Android, pehaps use ALooper
425+
#ifdef AK_OS_ANDROID
426+
auto& notifier = *thread_data.notifier_by_index[i];
427+
ThreadEventQueue::current().post_event(notifier, make<NotifierActivationEvent>(notifier.fd(), notifier.type()));
428+
#else
424429
auto& revents = thread_data.poll_fds[i].revents;
425430
auto& notifier = *thread_data.notifier_by_index[i];
426431

@@ -436,6 +441,7 @@ void EventLoopManagerUnix::wait_for_events(EventLoopImplementation::PumpMode mod
436441
type &= notifier.type();
437442
if (type != NotificationType::None)
438443
ThreadEventQueue::current().post_event(notifier, make<NotifierActivationEvent>(notifier.fd(), type));
444+
#endif
439445
}
440446
}
441447

0 commit comments

Comments
 (0)