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

Commit 7eaec5d5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Convert #define in Macros.h to bools"

parents 7965f4a1 465e1c06
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -379,21 +379,22 @@ void InputDevice::process(const RawEvent* rawEvents, size_t count) {
    // gamepad button presses are handled by different mappers but they should be dispatched
    // in the order received.
    for (const RawEvent* rawEvent = rawEvents; count != 0; rawEvent++) {
#if DEBUG_RAW_EVENTS
        if (DEBUG_RAW_EVENTS) {
            ALOGD("Input event: device=%d type=0x%04x code=0x%04x value=0x%08x when=%" PRId64,
              rawEvent->deviceId, rawEvent->type, rawEvent->code, rawEvent->value, rawEvent->when);
#endif
                  rawEvent->deviceId, rawEvent->type, rawEvent->code, rawEvent->value,
                  rawEvent->when);
        }

        if (mDropUntilNextSync) {
            if (rawEvent->type == EV_SYN && rawEvent->code == SYN_REPORT) {
                mDropUntilNextSync = false;
#if DEBUG_RAW_EVENTS
                if (DEBUG_RAW_EVENTS) {
                    ALOGD("Recovered from input event buffer overrun.");
#endif
                }
            } else {
#if DEBUG_RAW_EVENTS
                if (DEBUG_RAW_EVENTS) {
                    ALOGD("Dropped input event while waiting for next input sync.");
#endif
                }
            }
        } else if (rawEvent->type == EV_SYN && rawEvent->code == SYN_DROPPED) {
            ALOGI("Detected input event buffer overrun for device %s.", getName().c_str());
+6 −6
Original line number Diff line number Diff line
@@ -113,9 +113,9 @@ void InputReader::loopOnce() {
        if (mNextTimeout != LLONG_MAX) {
            nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
            if (now >= mNextTimeout) {
#if DEBUG_RAW_EVENTS
                if (DEBUG_RAW_EVENTS) {
                    ALOGD("Timeout expired, latency=%0.3fms", (now - mNextTimeout) * 0.000001f);
#endif
                }
                mNextTimeout = LLONG_MAX;
                timeoutExpiredLocked(now);
            }
@@ -155,9 +155,9 @@ void InputReader::processEventsLocked(const RawEvent* rawEvents, size_t count) {
                }
                batchSize += 1;
            }
#if DEBUG_RAW_EVENTS
            if (DEBUG_RAW_EVENTS) {
                ALOGD("BatchSize: %zu Count: %zu", batchSize, count);
#endif
            }
            processEventsForDeviceLocked(deviceId, rawEvent, batchSize);
        } else {
            switch (rawEvent->type) {
+6 −9
Original line number Diff line number Diff line
@@ -22,28 +22,25 @@
//#define LOG_NDEBUG 0

// Log debug messages for each raw event received from the EventHub.
#define DEBUG_RAW_EVENTS 0

// Log debug messages about touch screen filtering hacks.
#define DEBUG_HACKS 0
static constexpr bool DEBUG_RAW_EVENTS = false;

// Log debug messages about virtual key processing.
#define DEBUG_VIRTUAL_KEYS 0
static constexpr bool DEBUG_VIRTUAL_KEYS = false;

// Log debug messages about pointers.
static constexpr bool DEBUG_POINTERS = false;

// Log debug messages about pointer assignment calculations.
#define DEBUG_POINTER_ASSIGNMENT 0
static constexpr bool DEBUG_POINTER_ASSIGNMENT = false;

// Log debug messages about gesture detection.
#define DEBUG_GESTURES 0
static constexpr bool DEBUG_GESTURES = false;

// Log debug messages about the vibrator.
#define DEBUG_VIBRATOR 0
static constexpr bool DEBUG_VIBRATOR = false;

// Log debug messages about fusing stylus data.
#define DEBUG_STYLUS_FUSION 0
static constexpr bool DEBUG_STYLUS_FUSION = false;

#define INDENT "  "
#define INDENT2 "    "