LibCore: Remove unused NotifierActivationEvent fd() and type() methods

In 11b8bbe one thing that was claimed was that we now properly set the
Notifier's actual fd on the NotifierActivationEvent. It turns out that
claim was false because a crucial step was forgotten: actually set the
m_notifier_fd when registering. Despite that mistake, it ultimately was
irrelevant as the methods on NotifierActivationEvent are currently
unused code. We were posting the event to the correct Notifier receiver
so the on_activation was still getting invoked.

Given they are unused, NotifierActivationEvent can be defined the same
way as TimerEvent is, where we just pass the event type enum to the
Event base class. Additionally, NotificationType can be moved to
the Notifier header as this enum is now always used in the context of
creating or using a Notifier instance.
This commit is contained in:
ayeteadoe 2025-11-21 21:16:47 -08:00 committed by Jelle Raaijmakers
parent c34b5a544e
commit 4fb1ba0193
Notes: github-actions[bot] 2025-11-22 08:48:51 +00:00
7 changed files with 21 additions and 34 deletions

View file

@ -221,8 +221,10 @@ static int notifier_callback(int fd, int events, void* data)
if (events & ALOOPER_EVENT_ERROR)
type |= Core::NotificationType::Error;
Core::NotifierActivationEvent event(notifier.fd(), type);
notifier.dispatch_event(event);
if (type != Core::NotificationType::None) {
Core::NotifierActivationEvent event;
notifier.dispatch_event(event);
}
// Wake up from ALooper_pollAll, and service this event on the event queue
current_impl().wake();