Dump information about recent input events.
To help track down ANRs, include more information about recent
events in the input dispatcher dumps.
Bug: 9774124
Change-Id: I94732f173d3518c2f4780668d2eb3ee9ae9fcb10
diff --git a/services/input/InputDispatcher.h b/services/input/InputDispatcher.h
index 63ea781..0273dc4 100644
--- a/services/input/InputDispatcher.h
+++ b/services/input/InputDispatcher.h
@@ -846,6 +846,7 @@
EventEntry* mPendingEvent;
Queue<EventEntry> mInboundQueue;
+ Queue<EventEntry> mRecentQueue;
Queue<CommandEntry> mCommandQueue;
void dispatchOnceInnerLocked(nsecs_t* nextWakeupTime);
@@ -856,6 +857,9 @@
// Cleans up input state when dropping an inbound event.
void dropInboundEventLocked(EventEntry* entry, DropReason dropReason);
+ // Adds an event to a queue of recent events for debugging purposes.
+ void addRecentEventLocked(EventEntry* entry);
+
// App switch latency optimization.
bool mAppSwitchSawKeyDown;
nsecs_t mAppSwitchDueTime;