We only recorded the last received event (which is needed when a sensor
is activated on a connection) when there was some connection active.
This should fix an issue where sometimes the light sensor doesn't
return an event whent activated.
we also didn't need to hold the main lock while dispatching events
to clients.
Change-Id: I6c6386c040051ce205e3c0516c678e0603fa45e1
the increased maximum rate is needed for proper gyro integration, current gyro
parts can sample at up to 800Hz
Change-Id: Ide75f6d5bc7a0fdafeb2dafd72db39e7afb9e794
As part of this change, consolidated and cleaned up the Looper API so
that there are fewer distinctions between the NDK and non-NDK declarations
(no need for two callback types, etc.).
Removed the dependence on specific constants from sys/poll.h such as
POLLIN. Instead looper.h defines events like LOOPER_EVENT_INPUT for
the events that it supports. That should help make any future
under-the-hood implementation changes easier.
Fixed a couple of compiler warnings along the way.
Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae
SensorService now correctly sends the last known
state of a sensor as soon as a new connection is made.
This fixes the issue where, for instance, an application
could wait a long time before getting the light or proximity
sensor initial state.
Change-Id: Ic41392f3626e26c4f15746c7e17c7ecd44bbb10b
remove old sensor service and implement SensorManager
on top of the new (native) SensorManger API.
Change-Id: Iddb77d498755da3e11646473a44d651f12f40281