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

Commit 98ca4a2b authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

InputDispatcher: Check for normal connection for consistency

Whenever we test a connection status, check against Status::NORMAL
everywhere in dispatcher, for consistency.

Bug: 319186639
Test: atest inputflinger_tests
Change-Id: I01c1eb48d94b5a4d164080ffc185928445084c66
parent b13da8fa
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3840,8 +3840,7 @@ void InputDispatcher::finishDispatchCycleLocked(nsecs_t currentTime,
              connection->getInputChannelName().c_str(), seq, toString(handled));
    }

    if (connection->status == Connection::Status::BROKEN ||
        connection->status == Connection::Status::ZOMBIE) {
    if (connection->status != Connection::Status::NORMAL) {
        return;
    }

@@ -4114,7 +4113,7 @@ void InputDispatcher::synthesizeCancelationEventsForConnectionLocked(
void InputDispatcher::synthesizePointerDownEventsForConnectionLocked(
        const nsecs_t downTime, const std::shared_ptr<Connection>& connection,
        ftl::Flags<InputTarget::Flags> targetFlags) {
    if (connection->status == Connection::Status::BROKEN) {
    if (connection->status != Connection::Status::NORMAL) {
        return;
    }