am 567c00a8: Merge "Fix NPE when handling certain kinds of ANRs." into gingerbread

Merge commit '567c00a86f748ad4d798ae50a09505cc051fc095' into gingerbread-plus-aosp

* commit '567c00a86f748ad4d798ae50a09505cc051fc095':
  Fix NPE when handling certain kinds of ANRs.
This commit is contained in:
Jeff Brown
2010-09-16 11:08:46 -07:00
committed by Android Git Automerger

View File

@@ -777,10 +777,12 @@ void InputDispatcher::resumeAfterTargetsNotReadyTimeoutLocked(nsecs_t newTimeout
mInputTargetWaitTimeoutExpired = true; mInputTargetWaitTimeoutExpired = true;
// Input state will not be realistic. Mark it out of sync. // Input state will not be realistic. Mark it out of sync.
ssize_t connectionIndex = getConnectionIndexLocked(inputChannel); if (inputChannel.get()) {
if (connectionIndex >= 0) { ssize_t connectionIndex = getConnectionIndexLocked(inputChannel);
sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex); if (connectionIndex >= 0) {
connection->inputState.setOutOfSync(); sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
connection->inputState.setOutOfSync();
}
} }
} }
} }