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

Commit 40ad4706 authored by Jeff Brown's avatar Jeff Brown
Browse files

Fix NPE when handling certain kinds of ANRs.

Change-Id: Iccef1852e52c84f6f49d30c491431460a10b33d3
parent 30aeb8c8
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -777,6 +777,7 @@ void InputDispatcher::resumeAfterTargetsNotReadyTimeoutLocked(nsecs_t newTimeout
        mInputTargetWaitTimeoutExpired = true;

        // Input state will not be realistic.  Mark it out of sync.
        if (inputChannel.get()) {
            ssize_t connectionIndex = getConnectionIndexLocked(inputChannel);
            if (connectionIndex >= 0) {
                sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
@@ -784,6 +785,7 @@ void InputDispatcher::resumeAfterTargetsNotReadyTimeoutLocked(nsecs_t newTimeout
            }
        }
    }
}

nsecs_t InputDispatcher::getTimeSpentWaitingForApplicationLocked(
        nsecs_t currentTime) {