[Gta04-owner] Touch screen patch for Android
Alexander Rumyantsev
ran at mail.wplus.net
Sat Sep 14 14:25:53 CEST 2013
> Just to kick on subj solution - semi-working touchscreen ( move
> pointer
> to place / double click to effect ):
> https://docs.google.com/file/d/0B-rRgKAzYyoBYkxOdGdVc3V4VFk/edit?usp=sharing
> Build from current Replicant repo, nail-3.1x-plus kernel repo from
> goldelico and small patch:
>
New build
https://docs.google.com/file/d/0B-rRgKAzYyoBdU1WRjRXRUMtYkk/edit?usp=sharing of semi-working touchscreen with more correct patch:
project frameworks/base/
diff --git a/services/input/EventHub.cpp b/services/input/EventHub.cpp
index c527bfc..1d5b37e 100644
--- a/services/input/EventHub.cpp
+++ b/services/input/EventHub.cpp
@@ -684,6 +684,25 @@ size_t EventHub::getEvents(int timeoutMillis,
RawEvent* buf
fer, size_t bufferSiz
event->when = nsecs_t(iev.time.tv_sec) *
1000000000LL
+ nsecs_t(iev.time.tv_usec) * 1000LL;
LOGV("event time %lld, now %lld", event->when,
now);
+
+ // Double-check. Time may have moved on.
+ nsecs_t time =
systemTime(SYSTEM_TIME_MONOTONIC);
+ if (event->when > time) {
+ LOGW("An input event from %s has a
timestamp th
at appears to "
+ "have been generated using the
wrong cl
ock source "
+ "(expected CLOCK_MONOTONIC): "
+ "event time %lld, current time
%lld, call time %lld. "
+ "Using current time instead.",
+ device->path.string(),
event->when, time, now);
+ event->when = time;
+ } else {
+ LOGV("Event time is ok but failed the
fast path and required "
+ "an extra call to systemTime: "
+ "event time %lld, current time
%lld, call time %lld.",
+ event->when, time, now);
+ }
+
+
#else
event->when = now;
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20130914/73aa4e08/attachment.bin>
More information about the Gta04-owner
mailing list