if debug.sensors is true, extra debugging
sensors are enabled and HAL provided sensor fusion
is disabled
Change-Id: I9b093424edb8c5363d1337237cdf6abe4ab266f9
we now use a better quaternion propagation equation
this is especially beneficial for lower gyroscope rates
Change-Id: Ifbf273c8a092a8849ca4fe4b9bca30787e924018
When updateTexImage acquires a buffer but then aborts (due to an error
or the buffer being rejected), it releases the newly-acquired buffer.
It was passing the buffer slot's fences to releaseBuffer, even though
they hadn't been created after the acquire yet. This wasn't a bug,
since the fences would be cleared just after the buffer slot was last
released, but explicitly passing null fences makes this clearer.
Change-Id: I087f2ec3fd02c40f57782c1fca24eb9567e2943d
both API and implementation will change, this is just a prototype
intended to show feasability.
SurfaceFlinger is passed an ISurfaceTexture through a new
callback, it is in turn used to create an EGLSurface which
surfaceflinger will draw into in addition to the main screen.
Change-Id: Id0bbb0b854bb7bae44d57246a90b65d4567f9a21
1) there was a typo when computing the system covariance
a term in dT^3 was ommitted; the impact was was very limited
because of how small this term is.
2) initialize the system covariance matrix with non-zero
values for the gyro-bias part. this improves the initial
bias estimation speed significantly.
3) added comments here and there
Change-Id: I4328c9cca73e089889d5e74b9fda99d7831762dc
some sensor HALs don't handle EINTR, make sure to catch it in the
sensorservice.
also if we ever encounter an error that we can't handle, we abort
which will restart us (or the whole system process if we're running
in it)
Bug: 5511741
Change-Id: I7051882b06980f778736b53d6cd021a99b5ca8d2
Requested rate will be clamped to the minimum rate and then
to 1ms. Previously we would return an error if a lower
rate was asked. The SensorManager documentation wording
allows this change.
We do this to get more consistancy between all the sensor
drivers / HALs
Change-Id: I199f76486fb76ccbb11e7280460a03726c767e84
When the app requests "fastest", the java layer encodes this as a
delay of 0. SensorService was passing this unchanged to the HAL.
However the HAL is required to reject delays lower that the
advertised lower delay.
Change-Id: I92be77acd3af62ffeb49e4b31e24ddcd203510e2
This is intended to absorb the cost of the IPC
to the permission controller.
Cached permission checks cost about 3us, while
full blown ones are two orders of magnitude slower.
CAVEAT: PermissionCache can only handle system
permissions safely for now, because the cache is
not purged upon global permission changes.
Change-Id: I8b8a5e71e191e3c01e8f792f253c379190eee62e
when we do our own sensor fusion, we also export an
improved orientation sensor and hide the HAL sensor.
The fused orientation sensor is much more precise, fast
and smooth.
Change-Id: I0ea843b47ad9d12f6b22cce51f8629852d423126
also use correct time propagation equation
disable the fused sensors when gyro is not present since
they were unusable in practice.
Change-Id: Iad797425784e67dc6c5690e97c71c583418cc5b5
Add support for 9-axis gravity and linear-acceleration sensors
virtual orientation sensor using 9-axis fusion
Change-Id: I6717539373fce781c10e97b6fa59f68a831a592f
SensorService main thread wasn't java-enabled. however, in
some situations we end-up calling into the BatteryService from
that thread which causes a crash.
Change-Id: Iffba90e4c4b743dba84d62f1342001a9db31916d
Make sure to send an event down only for sensors that report a value only on data
change. Other sensors, will naturally send an event when the next event is available.
Bug: 4025681
Change-Id: I6d444deda388b6bc9a33e3371e09d390f1566ec5
when an app dies, make sure to disable all sensors that process
is connected to, regardless of wether this was the LAST connection
to this sensor.
Change-Id: I9c72b1792eee03815304674d5c2f25b5270e4748
The cut-off frequency of the lowpass filter was too high
for the sampling rate used by DELAY_NORMAL.
Now we use the same filters used for the gravity vector
(cascaded biquad at 1.5 Hz)
Change-Id: I319dc4f449a3abd553d61b196a9ddcf7782f912d