Add concept of gesture input monitors.
Bug: 123748692
Test: manual
Change-Id: I2abd90b622ef5d7461c783ef17fabd941103228e
diff --git a/libs/input/InputTransport.cpp b/libs/input/InputTransport.cpp
index e13b40e..2a5a604 100644
--- a/libs/input/InputTransport.cpp
+++ b/libs/input/InputTransport.cpp
@@ -27,12 +27,16 @@
#include <sys/types.h>
#include <unistd.h>
+#include <android-base/stringprintf.h>
+#include <binder/Parcel.h>
#include <cutils/properties.h>
#include <log/log.h>
+#include <utils/Trace.h>
-#include <binder/Parcel.h>
#include <input/InputTransport.h>
+using android::base::StringPrintf;
+
namespace android {
// Socket buffer size. The default is typically about 128KB, which is much larger than
@@ -420,6 +424,11 @@
int32_t repeatCount,
nsecs_t downTime,
nsecs_t eventTime) {
+ if (ATRACE_ENABLED()) {
+ std::string message = StringPrintf("publishKeyEvent(inputChannel=%s, keyCode=%" PRId32 ")",
+ mChannel->getName().c_str(), keyCode);
+ ATRACE_NAME(message.c_str());
+ }
#if DEBUG_TRANSPORT_ACTIONS
ALOGD("channel '%s' publisher ~ publishKeyEvent: seq=%u, deviceId=%d, source=0x%x, "
"action=0x%x, flags=0x%x, keyCode=%d, scanCode=%d, metaState=0x%x, repeatCount=%d,"
@@ -472,6 +481,12 @@
uint32_t pointerCount,
const PointerProperties* pointerProperties,
const PointerCoords* pointerCoords) {
+ if (ATRACE_ENABLED()) {
+ std::string message = StringPrintf(
+ "publishMotionEvent(inputChannel=%s, action=%" PRId32 ")",
+ mChannel->getName().c_str(), action);
+ ATRACE_NAME(message.c_str());
+ }
#if DEBUG_TRANSPORT_ACTIONS
ALOGD("channel '%s' publisher ~ publishMotionEvent: seq=%u, deviceId=%d, source=0x%x, "
"displayId=%" PRId32 ", "