Skip to content

Commit 25a465b

Browse files
jpa468Android (Google) Code Review
authored andcommitted
Revert "services: input events: enable debugging in EventHub (touch screen issues)"
This reverts commit df0a89d Get rid of the debugging for the release.
1 parent df0a89d commit 25a465b

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

services/input/EventHub.cpp

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#define LOG_TAG "EventHub"
1818

19-
#define LOG_NDEBUG 0
19+
// #define LOG_NDEBUG 0
2020

2121
#include "EventHub.h"
2222

@@ -767,7 +767,11 @@ size_t EventHub::getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSiz
767767
size_t count = size_t(readSize) / sizeof(struct input_event);
768768
for (size_t i = 0; i < count; i++) {
769769
const struct input_event& iev = readBuffer[i];
770-
nsecs_t delta = 0;
770+
ALOGV("%s got: t0=%d, t1=%d, type=%d, code=%d, value=%d",
771+
device->path.string(),
772+
(int) iev.time.tv_sec, (int) iev.time.tv_usec,
773+
iev.type, iev.code, iev.value);
774+
771775
#ifdef HAVE_POSIX_CLOCKS
772776
// Use the time specified in the event instead of the current time
773777
// so that downstream code can get more accurate estimates of
@@ -782,23 +786,10 @@ size_t EventHub::getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSiz
782786
// system call that also queries ktime_get_ts().
783787
event->when = nsecs_t(iev.time.tv_sec) * 1000000000LL
784788
+ nsecs_t(iev.time.tv_usec) * 1000LL;
785-
delta = now - event->when;
786-
787-
// Only log verbose if events are older that 1ms
788-
if (delta > 1 * 1000000LL) {
789-
ALOGV("event time %lld, now %lld, delta %lldus", event->when, now, delta / 1000LL);
790-
}
789+
ALOGV("event time %lld, now %lld", event->when, now);
791790
#else
792791
event->when = now;
793792
#endif
794-
if (delta > 1 * 1000000LL) {
795-
ALOGV("%s got: t0=%d, t1=%d, type=%d, code=%d, value=%d",
796-
device->path.string(),
797-
(int) iev.time.tv_sec, (int) iev.time.tv_usec,
798-
iev.type, iev.code, iev.value);
799-
}
800-
801-
802793
event->deviceId = deviceId;
803794
event->type = iev.type;
804795
event->code = iev.code;

0 commit comments

Comments
 (0)