diff options
| author | Jeff Brown <jeffbrown@google.com> | 2010-09-16 11:32:26 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-16 11:32:26 -0700 |
| commit | b27d07cccf2dbd34e486f6ae5cfdf361e6437162 (patch) | |
| tree | d249637f3dd9e26d54bfd8bee679ac8806808bf7 | |
| parent | 04065bdcca44d419812d4a2d955e3ee7b6c914eb (diff) | |
| parent | 03335af0dbf14d1eb4503be92a5b10199719898c (diff) | |
| download | frameworks_base-b27d07cccf2dbd34e486f6ae5cfdf361e6437162.zip frameworks_base-b27d07cccf2dbd34e486f6ae5cfdf361e6437162.tar.gz frameworks_base-b27d07cccf2dbd34e486f6ae5cfdf361e6437162.tar.bz2 | |
am 03335af0: am 567c00a8: Merge "Fix NPE when handling certain kinds of ANRs." into gingerbread
Merge commit '03335af0dbf14d1eb4503be92a5b10199719898c'
* commit '03335af0dbf14d1eb4503be92a5b10199719898c':
Fix NPE when handling certain kinds of ANRs.
| -rw-r--r-- | libs/ui/InputDispatcher.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp index 3b3c483..dea7936 100644 --- a/libs/ui/InputDispatcher.cpp +++ b/libs/ui/InputDispatcher.cpp @@ -777,10 +777,12 @@ void InputDispatcher::resumeAfterTargetsNotReadyTimeoutLocked(nsecs_t newTimeout mInputTargetWaitTimeoutExpired = true; // Input state will not be realistic. Mark it out of sync. - ssize_t connectionIndex = getConnectionIndexLocked(inputChannel); - if (connectionIndex >= 0) { - sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex); - connection->inputState.setOutOfSync(); + if (inputChannel.get()) { + ssize_t connectionIndex = getConnectionIndexLocked(inputChannel); + if (connectionIndex >= 0) { + sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex); + connection->inputState.setOutOfSync(); + } } } } |
