InputTracer: Track inbound events
Track whether an event is an inbound event or a synthesized event. Then
read the config flags from the perfetto backend, and decide whether to
ignore events in the trace depending on the flags that are enabled.
Bug: 210460522
Test: manual with perfetto
Change-Id: I665644f026fca4ab823221656c7b519893e2a1eb
diff --git a/services/inputflinger/dispatcher/trace/InputTracingPerfettoBackend.h b/services/inputflinger/dispatcher/trace/InputTracingPerfettoBackend.h
index 7e1e36a..920ea60 100644
--- a/services/inputflinger/dispatcher/trace/InputTracingPerfettoBackend.h
+++ b/services/inputflinger/dispatcher/trace/InputTracingPerfettoBackend.h
@@ -20,6 +20,7 @@
#include "InputTracingPerfettoBackendConfig.h"
+#include <ftl/flags.h>
#include <perfetto/tracing.h>
#include <mutex>
@@ -65,6 +66,9 @@
void OnStart(const StartArgs&) override;
void OnStop(const StopArgs&) override;
+ bool shouldIgnoreTracedInputEvent(const EventType&) const;
+ inline ftl::Flags<TraceFlag> getFlags() const { return mConfig.flags; }
+
private:
const int32_t mInstanceId;
TraceConfig mConfig;