Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3dd60e21 authored by Michael Wright's avatar Michael Wright
Browse files

Add concept of gesture input monitors.

Bug: 123748692
Test: manual
Change-Id: I2abd90b622ef5d7461c783ef17fabd941103228e
parent 08014733
Loading
Loading
Loading
Loading
+16 −1
Original line number Original line Diff line number Diff line
@@ -27,12 +27,16 @@
#include <sys/types.h>
#include <sys/types.h>
#include <unistd.h>
#include <unistd.h>


#include <android-base/stringprintf.h>
#include <binder/Parcel.h>
#include <cutils/properties.h>
#include <cutils/properties.h>
#include <log/log.h>
#include <log/log.h>
#include <utils/Trace.h>


#include <binder/Parcel.h>
#include <input/InputTransport.h>
#include <input/InputTransport.h>


using android::base::StringPrintf;

namespace android {
namespace android {


// Socket buffer size.  The default is typically about 128KB, which is much larger than
// Socket buffer size.  The default is typically about 128KB, which is much larger than
@@ -420,6 +424,11 @@ status_t InputPublisher::publishKeyEvent(
        int32_t repeatCount,
        int32_t repeatCount,
        nsecs_t downTime,
        nsecs_t downTime,
        nsecs_t eventTime) {
        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
#if DEBUG_TRANSPORT_ACTIONS
    ALOGD("channel '%s' publisher ~ publishKeyEvent: seq=%u, deviceId=%d, source=0x%x, "
    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,"
            "action=0x%x, flags=0x%x, keyCode=%d, scanCode=%d, metaState=0x%x, repeatCount=%d,"
@@ -472,6 +481,12 @@ status_t InputPublisher::publishMotionEvent(
        uint32_t pointerCount,
        uint32_t pointerCount,
        const PointerProperties* pointerProperties,
        const PointerProperties* pointerProperties,
        const PointerCoords* pointerCoords) {
        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
#if DEBUG_TRANSPORT_ACTIONS
    ALOGD("channel '%s' publisher ~ publishMotionEvent: seq=%u, deviceId=%d, source=0x%x, "
    ALOGD("channel '%s' publisher ~ publishMotionEvent: seq=%u, deviceId=%d, source=0x%x, "
            "displayId=%" PRId32 ", "
            "displayId=%" PRId32 ", "