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: none
Test: none
Change-Id: I0ef0b3a0820ce643486cec5d9cbeb0f593344ee6
diff --git a/services/inputflinger/dispatcher/InputDispatcher.h b/services/inputflinger/dispatcher/InputDispatcher.h
index 4f950a2..e87a306 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.h
+++ b/services/inputflinger/dispatcher/InputDispatcher.h
@@ -496,8 +496,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);