diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-08-15 12:55:32 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2011-08-15 12:55:32 -0700 |
commit | abb4d446a10b2defd342b1a2fa6462b52b82cdef (patch) | |
tree | 838ace2ab9aa023cae8ff4ffe827547e813eb657 /services/input | |
parent | 0a0ab128a65900a23f1018a14f5cbecec6443dd3 (diff) | |
download | frameworks_base-abb4d446a10b2defd342b1a2fa6462b52b82cdef.zip frameworks_base-abb4d446a10b2defd342b1a2fa6462b52b82cdef.tar.gz frameworks_base-abb4d446a10b2defd342b1a2fa6462b52b82cdef.tar.bz2 |
Fix blocked event handling in InputDispatcher.
Bug: 5161854
The InputDispatcher contains code to recover from ANRs more quickly
when the user touches a different application. When triggered,
it sets mNextUnblockedEvent to the next event it should dispatch
(to the next application). All prior events are dropped.
This change fixes a bug where mNextUnblockedEvent could potentially
never be reset back to NULL if the inbound queue was drained
for some reason.
Change-Id: I21be2f02c9fc770bd260ea414db8bb184df89ada
Diffstat (limited to 'services/input')
-rw-r--r-- | services/input/InputDispatcher.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp index 22372cf..cbdfe8c 100644 --- a/services/input/InputDispatcher.cpp +++ b/services/input/InputDispatcher.cpp @@ -666,6 +666,9 @@ void InputDispatcher::releaseInboundEventLocked(EventEntry* entry) { #endif setInjectionResultLocked(entry, INPUT_EVENT_INJECTION_FAILED); } + if (entry == mNextUnblockedEvent) { + mNextUnblockedEvent = NULL; + } entry->release(); } |