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

Commit 4967660c authored by Jeff Brown's avatar Jeff Brown Committed by The Android Automerger
Browse files

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
parent d837a00a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -666,6 +666,9 @@ void InputDispatcher::releaseInboundEventLocked(EventEntry* entry) {
#endif
        setInjectionResultLocked(entry, INPUT_EVENT_INJECTION_FAILED);
    }
    if (entry == mNextUnblockedEvent) {
        mNextUnblockedEvent = NULL;
    }
    entry->release();
}