2
0
mirror of synced 2025-02-23 23:08:14 +00:00

3 Commits

Author SHA1 Message Date
Burcu Dogan
dad00d93e6 Revert "mobile/sensor: block until timeout occurs"
If the looper is waking up, the current timeout limit is exceeded.
There are no external APIs to query if a looper is trying to wake up
or blocking to wait for the event data. Therefore, I'm this
change and will replace the timeout with a significantly high number
that could only be exceeded if sensor fails with a fatal problem.
The goal is not to wait on ALooper_pollAll forever.

This reverts commit 1575a42f33e3354db87760bcc8c9d951e35347dd.

Change-Id: I861d81f2550c4435247a0b1d4ce141e94d1e3ec9
Reviewed-on: https://go-review.googlesource.com/8565
Reviewed-by: Burcu Dogan <jbd@google.com>
2015-04-07 20:20:34 +00:00
Burcu Dogan
1575a42f33 mobile/sensor: block until timeout occurs
Avoid blocking forever until there are no new events in the
queue. The queue should have been fed with new events once in each t,
where t is 2 * minimum delay enabled on the queue.

Change-Id: Ie6c754816e89a93adf62d71448c6c85f167350eb
Reviewed-on: https://go-review.googlesource.com/8414
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-04-06 14:29:59 +00:00
Burcu Dogan
f48e3e4998 mobile/sensor: add android support
This CL contains an Android-specific Manager implementation.
On Android, we create a new ALooper for each Manager instance and
all CGO calls are proxified to an OS-thread-locked goroutine.

Change-Id: I33272cd4369d0b7850f97e840fe4bbe5aee78ec0
Reviewed-on: https://go-review.googlesource.com/8249
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-04-02 19:28:00 +00:00