Reduce the usage of goto statements in dispatcher
Currently, there are a lot of uses of goto statements in
InputDispatcher, which makes the code hard to follow. Instead, remove
some unused code and reduce the goto usage.
Bug: 143459140
Test: presubmit
Change-Id: I0ef0b3a0820ce643486cec5d9cbeb0f593344ee6
Merged-In: I0ef0b3a0820ce643486cec5d9cbeb0f593344ee6
(cherry picked from commit 767917f075b1abfd8cc5905843021b7c3a468be9)
diff --git a/services/inputflinger/dispatcher/InputDispatcher.h b/services/inputflinger/dispatcher/InputDispatcher.h
index 670d0e1..d122282 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.h
+++ b/services/inputflinger/dispatcher/InputDispatcher.h
@@ -497,8 +497,8 @@
LatencyStatistics mTouchStatistics{TOUCH_STATS_REPORT_PERIOD};
void reportTouchEventForStatistics(const MotionEntry& entry);
- void updateDispatchStatistics(nsecs_t currentTime, const EventEntry& entry,
- int32_t injectionResult, nsecs_t timeSpentWaitingForApplication);
+ void reportDispatchStatistics(std::chrono::nanoseconds eventDuration,
+ const Connection& connection, bool handled);
void traceInboundQueueLengthLocked() REQUIRES(mLock);
void traceOutboundQueueLength(const sp<Connection>& connection);
void traceWaitQueueLength(const sp<Connection>& connection);