Report input metrics using LatencyAggregator

The new class, LatencyAggregator, is responsible for reporting the input
metrics to statsd.

Bug: 167947340
Test: tested using statsd_testdrive
Change-Id: I1990851a44df897fe989046e7363bd71e1c0c129
diff --git a/services/inputflinger/dispatcher/InputDispatcher.h b/services/inputflinger/dispatcher/InputDispatcher.h
index e592f42..bb3f3e6 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.h
+++ b/services/inputflinger/dispatcher/InputDispatcher.h
@@ -29,6 +29,7 @@
 #include "InputState.h"
 #include "InputTarget.h"
 #include "InputThread.h"
+#include "LatencyAggregator.h"
 #include "LatencyTracker.h"
 #include "Monitor.h"
 #include "TouchState.h"
@@ -636,12 +637,7 @@
     void doOnPointerDownOutsideFocusLockedInterruptible(CommandEntry* commandEntry) REQUIRES(mLock);
 
     // Statistics gathering.
-    class EmptyTimelineProcessor : public InputEventTimelineProcessor {
-        void processTimeline(const InputEventTimeline& timeline) override {
-            // TODO(b/167947340): report latency information to the real aggregator
-        }
-    } mEmptyProcessor GUARDED_BY(mLock);
-
+    LatencyAggregator mLatencyAggregator GUARDED_BY(mLock);
     LatencyTracker mLatencyTracker GUARDED_BY(mLock);
     void traceInboundQueueLengthLocked() REQUIRES(mLock);
     void traceOutboundQueueLength(const Connection& connection);