Merge "Fix issues catching up to touch events after a short pause." into klp-dev
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp
index 274009f..10a639e 100644
--- a/services/input/InputDispatcher.cpp
+++ b/services/input/InputDispatcher.cpp
@@ -1699,7 +1699,7 @@
         // up with lots of events because the application is not responding.
         // This condition ensures that ANRs are detected reliably.
         if (!connection->waitQueue.isEmpty()
-                && currentTime >= connection->waitQueue.head->eventEntry->eventTime
+                && currentTime >= connection->waitQueue.head->deliveryTime
                         + STREAM_AHEAD_EVENT_TIMEOUT) {
             return false;
         }