Merge "Fix blocked event handling in InputDispatcher. Bug: 5161854"
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 @@
 #endif
         setInjectionResultLocked(entry, INPUT_EVENT_INJECTION_FAILED);
     }
+    if (entry == mNextUnblockedEvent) {
+        mNextUnblockedEvent = NULL;
+    }
     entry->release();
 }