Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eba59ded authored by Prabir Pradhan's avatar Prabir Pradhan Committed by Android (Google) Code Review
Browse files

Merge "InputTracer: Disallow adding new targets from a derived event tracker" into main

parents 2502a0b1 b95d4aa4
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -101,14 +101,15 @@ std::unique_ptr<EventTrackerInterface> InputTracer::createTrackerForSyntheticEve

void InputTracer::dispatchToTargetHint(const EventTrackerInterface& cookie,
                                       const InputTarget& target) {
    if (isDerivedCookie(cookie)) {
        LOG(FATAL) << "Event target cannot be updated from a derived cookie.";
    }
    auto& eventState = getState(cookie);
    if (eventState->isEventProcessingComplete) {
        // TODO(b/210460522): Disallow adding new targets after eventProcessingComplete() is called.
        return;
    }
    if (isDerivedCookie(cookie)) {
        // TODO(b/210460522): Disallow adding new targets from a derived cookie.
        return;
    }
    // TODO(b/210460522): Determine if the event is sensitive based on the target.
}