OSDN Git Service
Mathias Agopian [Wed, 25 Jul 2012 04:08:59 +0000 (21:08 -0700)]
get rid of ro.sf.hwrotation, it's not used anymore
Change-Id: I2ee469ac89ecd65d7187be5cab08b5cc18f67cbe
Mathias Agopian [Wed, 25 Jul 2012 04:41:09 +0000 (21:41 -0700)]
add a layerStack attribute to Layers.
this attribute can be set through a regular transaction using
SurfaceComposerClient (just like any other attribute, eg: position or size)
Change-Id: I701a47c677ea6442ca713728a93335328cd2b172
Mathias Agopian [Wed, 25 Jul 2012 03:43:54 +0000 (20:43 -0700)]
update SF binder protocol to support setting display attributes
no change of functionality -- the old behavior is implemented
on top of this new protocol.
this new protocol will allow, eventually, to pass informations
about displays and layer stacks.
Change-Id: Ic6c2295e61ec8ecbc8ce01ab7664e35d928202fc
Mathias Agopian [Tue, 24 Jul 2012 06:11:29 +0000 (23:11 -0700)]
SurfaceFlinger cleanup
mostly refactored SurfaceFlinger.h, but also removed dead code.
cleaned-up a few includes as well.
Change-Id: Ib15f4ffe567912b61ee98aa076c6a283b72811b5
Thomas Tafertshofer [Mon, 23 Jul 2012 23:52:32 +0000 (16:52 -0700)]
Fixed bug in opengl es binding generation
This fixes the glgen code generation for methods
which have a buffer arg that can be NULL.
Bug:
6845189
Change-Id: I5fb745b806601e5665f97bfd15fd865cd9c241ed
Mathias Agopian [Mon, 23 Jul 2012 23:25:43 +0000 (16:25 -0700)]
Merge "glgen stubs to fix bad methods in gles20 bindings"
Jamie Gennis [Mon, 23 Jul 2012 23:21:58 +0000 (16:21 -0700)]
Merge "Update the EGL_ANDROID_fence_sync spec."
Jamie Gennis [Fri, 20 Jul 2012 18:55:07 +0000 (11:55 -0700)]
Update the EGL_ANDROID_fence_sync spec.
Change-Id: I26589e51c2023aed4da8a25a098b01804200ddc2
Jesse Hall [Mon, 23 Jul 2012 20:11:19 +0000 (13:11 -0700)]
Increment iterator on early-out too
Bug:
6860046
Change-Id: I82f9e4062cb58d5479c9d8dc5f2f0770a1dcc605
Jesse Hall [Sun, 22 Jul 2012 01:51:20 +0000 (18:51 -0700)]
Merge "Handle empty HWC layer list when composing"
Jesse Hall [Thu, 19 Jul 2012 23:44:38 +0000 (16:44 -0700)]
Handle empty HWC layer list when composing
Bug:
6777877
Change-Id: I71e9b948d04dda33d45cfa986d9c7e28328cf749
Nick Pelly [Fri, 20 Jul 2012 16:46:14 +0000 (09:46 -0700)]
Merge "Add elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible."
Thomas Tafertshofer [Thu, 19 Jul 2012 23:50:08 +0000 (16:50 -0700)]
glgen stubs to fix bad methods in gles20 bindings
this adds correct versions of the broken GLES20 methods
glGetShaderSource, glGetActiveAttrib and glGetActiveUniform.
the old broken methods are still there and need to be @hide later.
Bug:
6006380
Change-Id: Ide74242ada54b85459b459ae4f20cd26a23c7610
Nick Pelly [Thu, 19 Jul 2012 16:17:24 +0000 (09:17 -0700)]
Add elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible.
Change-Id: I4231c8ca32663e6e2cb5b7c126d091f837373807
Mathias Agopian [Thu, 12 Jul 2012 21:25:33 +0000 (14:25 -0700)]
factor EGL/GL and surface creation out of DisplayHardware
Change-Id: Icd85a6a4caad06f056578008af3e21666fa8b1f4
Mathias Agopian [Wed, 11 Jul 2012 20:48:17 +0000 (13:48 -0700)]
mVisibleLayersSortedByZ is now maintained per display
Change-Id: Idcdb77eba1a3f99b3e4b2150128a82acaffcd2a8
Mathias Agopian [Thu, 19 Jul 2012 01:31:41 +0000 (18:31 -0700)]
Merge "OpenGL bindings fix for methods with iobuffer args"
Mathias Agopian [Thu, 19 Jul 2012 01:30:45 +0000 (18:30 -0700)]
Merge "Remove @hide from the generated EGL 1.4 API"
Jeff Brown [Mon, 16 Jul 2012 23:18:23 +0000 (16:18 -0700)]
Merge "Remove unused layer flags."
Jeff Brown [Mon, 16 Jul 2012 23:05:50 +0000 (16:05 -0700)]
Remove unused layer flags.
Change-Id: Ia85365f18770a9a2c0a0e30ae56b6c2226d41be6
Colin Cross [Mon, 16 Jul 2012 22:58:28 +0000 (15:58 -0700)]
Merge "surfaceflinger: call into hardware composer to blank screen"
Jeff Brown [Mon, 16 Jul 2012 22:53:12 +0000 (15:53 -0700)]
Merge "Remove freeze(), unfreeze() and setFreezeTint()."
Jeff Brown [Mon, 16 Jul 2012 22:53:07 +0000 (15:53 -0700)]
Merge "Remove freezeDisplay(), which is no-op."
Jeff Brown [Mon, 16 Jul 2012 22:38:18 +0000 (15:38 -0700)]
Remove freeze(), unfreeze() and setFreezeTint().
This is all dead code.
Change-Id: I646673aac793a6ec45021c370a2450f0ea4fbcce
Jeff Brown [Mon, 16 Jul 2012 21:58:11 +0000 (14:58 -0700)]
Remove freezeDisplay(), which is no-op.
Change-Id: I2b70249a1545636fd6d98b58057b22f9529cad21
Edwin Wong [Sat, 14 Jul 2012 00:54:30 +0000 (17:54 -0700)]
am
647336c7: am
e0daeb39: Fixed sample video corrupted in MediaCodec mode.
* commit '
647336c76e8da68fb44ca52ec14a8a2c6d5735bb':
Fixed sample video corrupted in MediaCodec mode.
Thomas Tafertshofer [Thu, 12 Jul 2012 22:54:56 +0000 (15:54 -0700)]
Remove @hide from the generated EGL 1.4 API
Change-Id: Ia5707533fcf1186ef648b8a4e25987f5e7e7dea3
Colin Cross [Fri, 13 Jul 2012 00:56:34 +0000 (17:56 -0700)]
surfaceflinger: call into hardware composer to blank screen
Call into the new HWC blank operation to blank or unblank the screen.
Legacy systems may have already blanked the screen via early suspend,
and can choose to not implement the blank operation in their hardware
composer implementation.
Change-Id: Ib403c8c0e36367a2cfef3e1d124872fcfeb9e7cb
Edwin Wong [Fri, 13 Jul 2012 22:12:23 +0000 (15:12 -0700)]
am
e0daeb39: Fixed sample video corrupted in MediaCodec mode.
* commit '
e0daeb3933e034f037630715e4cd2ecb3880498b':
Fixed sample video corrupted in MediaCodec mode.
Edwin Wong [Wed, 11 Jul 2012 02:57:26 +0000 (19:57 -0700)]
Fixed sample video corrupted in MediaCodec mode.
Change-Id: Ibe11a83199f3db1ba6266a1a9e11c7fc24ceb554
related-to-bug:
6732061
Thomas Tafertshofer [Thu, 12 Jul 2012 18:16:20 +0000 (11:16 -0700)]
OpenGL bindings fix for methods with iobuffer args
This changes generation of the OpenGL bindings to prevent
crashes of methods with more then one nio buffer argument.
Bug:
6772416
Change-Id: I4eff25c2f568dea78a6ffd3e95ff4620ab4b3b7d
Mathias Agopian [Thu, 12 Jul 2012 00:19:00 +0000 (17:19 -0700)]
Merge "one more step towards multiple display support"
Mathias Agopian [Wed, 11 Jul 2012 23:07:39 +0000 (16:07 -0700)]
Merge "improve glgen tool to support EGL1.4"
Thomas Tafertshofer [Fri, 15 Jun 2012 23:22:43 +0000 (16:22 -0700)]
improve glgen tool to support EGL1.4
- added EGL1.4 bindings generation
- fixed bugs in GLES bindings
Bug:
6709865
Change-Id: I04ac63f652e1968a51eb833f47e00336ea449980
Mathias Agopian [Fri, 29 Jun 2012 21:12:52 +0000 (14:12 -0700)]
one more step towards multiple display support
- remove dependency on cached state in validateVisibility
- get rid of mVertices and mTransformedBounds
- get rid of validateVisibility
- get rid of unlockPageFlip
- handleTransaction now returns a dirty region
- computevisibileregion now uses window-manager space
Jesse Hall [Tue, 3 Jul 2012 20:41:54 +0000 (13:41 -0700)]
Fix check for fence merge success
Change-Id: I9b16526ebfe4ffabf7c4372cca9b192ce046aa21
Jesse Hall [Mon, 2 Jul 2012 23:49:28 +0000 (16:49 -0700)]
Only set acquire fences on overlay layers
Change-Id: I08e8173f83580de5a4e43a0ba5ea03e5ec6e8782
Jesse Hall [Fri, 29 Jun 2012 22:21:18 +0000 (15:21 -0700)]
Pass fence to HWC on first use of buffer
Also do a CPU-wait on the fence before using it for GL composition.
Change-Id: I0f645a42a44803276cae11b904e5a26d65871562
Jesse Hall [Thu, 28 Jun 2012 21:27:53 +0000 (14:27 -0700)]
Return fence from acquireBuffer
Change-Id: Iab22054c1dc4fd84affab3cc5bbdcd5a1e689666
Jesse Hall [Thu, 28 Jun 2012 19:52:05 +0000 (12:52 -0700)]
Pass fences with buffers from SurfaceTextureClient
Change-Id: I09b49433788d01e8b2b3684bb4d0112be29538d3
Jesse Hall [Fri, 29 Jun 2012 16:54:25 +0000 (09:54 -0700)]
Merge "Clarify aborted updateTexImage use of fences"
Jesse Hall [Fri, 29 Jun 2012 16:54:08 +0000 (09:54 -0700)]
Merge "Return fence to client in dequeuBuffer"
Mathias Agopian [Fri, 29 Jun 2012 02:46:54 +0000 (19:46 -0700)]
add a way to enable debugging sensors at runtime
if debug.sensors is true, extra debugging
sensors are enabled and HAL provided sensor fusion
is disabled
Change-Id: I9b093424edb8c5363d1337237cdf6abe4ab266f9
Mathias Agopian [Fri, 29 Jun 2012 01:21:43 +0000 (18:21 -0700)]
improve sensor fusion
we now use a better quaternion propagation equation
this is especially beneficial for lower gyroscope rates
Change-Id: Ifbf273c8a092a8849ca4fe4b9bca30787e924018
Mathias Agopian [Thu, 28 Jun 2012 01:51:43 +0000 (18:51 -0700)]
add some comments
Change-Id: Ia2e2c9531715fc2bd5b51c4dc58389e01abfe7e6
Mathias Agopian [Thu, 21 Jun 2012 00:51:20 +0000 (17:51 -0700)]
get rid of GraphicPlane
its functionality is now folded into DisplayHardware
there will be more changes in that area.
Jesse Hall [Thu, 28 Jun 2012 22:06:53 +0000 (15:06 -0700)]
Clarify aborted updateTexImage use of fences
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
Jesse Hall [Mon, 25 Jun 2012 20:54:23 +0000 (13:54 -0700)]
Return fence to client in dequeuBuffer
Change-Id: Ic19750793ad993f0e85391f3cabd743ba565d4c9
Mathias Agopian [Tue, 19 Jun 2012 01:06:45 +0000 (18:06 -0700)]
First prototype atttempting to support an external display
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
Mathias Agopian [Thu, 28 Jun 2012 21:47:54 +0000 (14:47 -0700)]
move sensorservice from frameworks/base to frameworks/native
this commit also imports all of sensorservice history.
Change-Id: Iadffcc92be600c48175b8afadcb15b6648532b3f
Mathias Agopian [Tue, 19 Jun 2012 01:49:08 +0000 (18:49 -0700)]
small improvement to sensor fusion
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
Mathias Agopian [Thu, 31 May 2012 01:08:30 +0000 (18:08 -0700)]
fix a potential buffer overflow in sensorservice
Bug:
6580560
Change-Id: Icf6cafbca09174515a964a7cd69d8cc589ad52de
Mathias Agopian [Wed, 30 May 2012 02:46:14 +0000 (19:46 -0700)]
Fix a stack corruption in sensorservice
Bug:
6576732
Change-Id: If0f2fb0d0c35b932fb77cd262e676042145b28f9
Mathias Agopian [Fri, 20 Apr 2012 01:18:24 +0000 (18:18 -0700)]
fix a typo causing sensor event to be sorted in reverse chronological order
Change-Id: I041c64616d88ed1abb5efc90ed9eb0d9baeb4832
Mathias Agopian [Tue, 3 Apr 2012 01:38:02 +0000 (18:38 -0700)]
usea socketpair instead of a pipe in BitTube
Bug:
6252830
Change-Id: I363cc7e9f73a5b7d8bbccee312c6d8938c84e99a
Steve Block [Fri, 6 Jan 2012 19:20:56 +0000 (19:20 +0000)]
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220
Bug:
5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
Steve Block [Thu, 5 Jan 2012 23:22:43 +0000 (23:22 +0000)]
Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/157065
Bug:
5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
Steve Block [Wed, 4 Jan 2012 20:05:49 +0000 (20:05 +0000)]
Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156801
Bug:
5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
Steve Block [Tue, 20 Dec 2011 16:23:08 +0000 (16:23 +0000)]
Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016
Bug:
5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
Mathias Agopian [Thu, 10 Nov 2011 01:50:15 +0000 (17:50 -0800)]
handle EINTR when calling sensor HAL's poll function
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
Mathias Agopian [Tue, 8 Nov 2011 05:21:47 +0000 (21:21 -0800)]
SensorService now always clamps the requested rate
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
Mathias Agopian [Wed, 2 Nov 2011 00:37:49 +0000 (17:37 -0700)]
fix an issue where SensorService could request an invalid sensor delay
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
Mathias Agopian [Fri, 21 Oct 2011 01:42:02 +0000 (18:42 -0700)]
Rename SensorChannel to BitTube
Mathias Agopian [Wed, 14 Sep 2011 23:43:34 +0000 (16:43 -0700)]
improve sensorservice dumpsys
Change-Id: I8b53d5cab884c3aca16d95df5fbf288368d52e8b
Mathias Agopian [Tue, 13 Sep 2011 05:16:01 +0000 (22:16 -0700)]
improve sensorservice_test output
Change-Id: I6248b6f1f001fedec1bddcddfcd2b381d9bb4bf4
Mathias Agopian [Thu, 25 Aug 2011 01:40:33 +0000 (18:40 -0700)]
Fix a few style issues and remove LOG spam
Change-Id: I6b6f75373f4ac28f98dea6a6f1c2567a6aa02243
Michael Johnson [Fri, 19 Aug 2011 18:47:08 +0000 (11:47 -0700)]
More error checks to avoid div by zero.
Change-Id: I18e5b72d02bf5420c14334d3a03f18fa40572d31
Max Braun [Thu, 18 Aug 2011 01:22:52 +0000 (18:22 -0700)]
Fix occasional fusion divergence by detecting it and resetting the fusion.
Change-Id: I51186e12fb9b2316e3671e3908174f4495df89a0
Mathias Agopian [Tue, 16 Aug 2011 00:10:23 +0000 (17:10 -0700)]
have the sensorsevice test print the delay of the first received event
Change-Id: I89d63122574c3f8790f00512c76d59b463acf18f
Mathias Agopian [Thu, 21 Jul 2011 01:51:15 +0000 (18:51 -0700)]
silence sensorservice when it's dropping events
Change-Id: Ib05862e545aa780821aa605e45ab189f530494b7
Mathias Agopian [Thu, 14 Jul 2011 23:39:46 +0000 (16:39 -0700)]
sensorservice: be more robust when there are no sensor h/w
Bug:
5030108
Change-Id: I45b85b3c492b9268cb0ae44d2e5fc8c708b6e66e
Jeff Brown [Tue, 12 Jul 2011 05:12:16 +0000 (22:12 -0700)]
Remove the simulator target from all makefiles. Bug:
5010576
Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
Mathias Agopian [Mon, 27 Jun 2011 23:05:52 +0000 (16:05 -0700)]
PermissionCache caches permission checks
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
Mathias Agopian [Mon, 13 Jun 2011 23:00:49 +0000 (16:00 -0700)]
cleanup Kalman filter parameters, add/fix comments/units
Change-Id: Iedcae7164af8f7ea0e048ea7c72d0f35d16d739f
Mathias Agopian [Thu, 9 Jun 2011 03:06:50 +0000 (20:06 -0700)]
improve orientation sensor with gyro data
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
Mathias Agopian [Sat, 28 May 2011 01:18:13 +0000 (18:18 -0700)]
use quaternions instead of MRPs
also use correct time propagation equation
disable the fused sensors when gyro is not present since
they were unusable in practice.
Change-Id: Iad797425784e67dc6c5690e97c71c583418cc5b5
Mathias Agopian [Wed, 18 May 2011 05:54:42 +0000 (22:54 -0700)]
9-axis sensor fusion with Kalman filter
Add support for 9-axis gravity and linear-acceleration sensors
virtual orientation sensor using 9-axis fusion
Change-Id: I6717539373fce781c10e97b6fa59f68a831a592f
Mathias Agopian [Fri, 27 May 2011 23:23:58 +0000 (16:23 -0700)]
Fix a few issues with sensors reference-counting
Mathias Agopian [Thu, 19 May 2011 23:21:32 +0000 (16:21 -0700)]
Fix a crasher in SensorService
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
Iliyan Malchev [Mon, 14 Mar 2011 21:02:13 +0000 (14:02 -0700)]
frameworks/base: remove LOCAL_PRELINK_MODULE
Change-Id: I54dd62ebef47e7690afa5a858f3cad941b135481
Signed-off-by: Iliyan Malchev <malchev@google.com>
Mathias Agopian [Thu, 10 Mar 2011 23:23:28 +0000 (15:23 -0800)]
fix [
4025681] continuous sensors should not try to send an event as soon as they're activated
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
Mathias Agopian [Thu, 3 Feb 2011 22:52:47 +0000 (14:52 -0800)]
fix [
3421350] Killing a game that uses the accelerometer renders the device unable to sleep
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
Mathias Agopian [Wed, 19 Jan 2011 22:26:25 +0000 (14:26 -0800)]
fix [
3369027] Sensor.TYPE_ROTATION_VECTOR is unstable and returns NaNs when running slowly
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
Mathias Agopian [Tue, 30 Nov 2010 01:26:51 +0000 (17:26 -0800)]
fix [
3237242] sensormanager sensor active count gets out of sync
whether a physical sensor needed to be active or not was managed by
a simpe reference counter; unfortunatelly nothing prevented it to
get out of sync if a sensor was disabled more than once.
sensorservice already maintainted a list of all the "clients"
connected to a physical sensor; we now use that list to determine if
a sensor should be enabled. This can never be "out-of-sync" since
this is the only data structure linking a sensor to a user of that
sensor.
also removed the isEnabled() method, which was never used and
implemented wrongly (since it didn't take into account that a sensor
could be disabled for a client but not of another).
Change-Id: I789affb877728ca957e99f7ba749def37c4db1c7
Mathias Agopian [Fri, 12 Nov 2010 01:58:51 +0000 (17:58 -0800)]
Uses 4-th order low-pass for extracting gravity.
Most accelerometers have 8-bits accuracy so we beed to
reject 48dB in thestop-band, which requires a 4-th order
filter at the cut-off frequency we're using.
Change-Id: Ic00421d38d751641f86b1f3ad7663e6b44a91198
Mathias Agopian [Mon, 22 Nov 2010 23:48:10 +0000 (15:48 -0800)]
allow rotation-vector to have 4 components
- upadte documentation for rotation vector
- update method dealing with rotation vector to deal with 4 components
- virtual rotation-vector sensor reports all four components
- improve SensorManager documentation layout
Whent he 4-th component of the rotation-vector is present, we can save
a square-root when computing the quaternion or rotation matrix from it.
Change-Id: Ia84d278dd5f0909fab1c5ba050f8df2679e2c7c8
Mathias Agopian [Mon, 22 Nov 2010 09:04:09 +0000 (01:04 -0800)]
don't attempt to normalize the rotation vector
indeed, by construction of the rotation matrix, it is
guaranteed to have a length of 1.
moreover, the normalization code was missing a square-root,
fortunatelly, since the length is 1, this didn't cause any
damage (since sqrt(1) = 1).
Change-Id: I9facd668caaf5bb3bfccb139ab872f2bb2066365
Mathias Agopian [Fri, 12 Nov 2010 01:58:51 +0000 (17:58 -0800)]
Add support for virtual sensors.
Rework sensorservice to allow "virtual sensors", that is
sensors that report a synthetized value based on real sensors.
the main change to sensorservice is around managing which real
sensor need to be activated and which rate to use.
The logic for all this has been moved into SensorDevice, which
essentially wraps the sensor HAL but adds two features to it:
- it keeps track of which sensors need to be activated
- it keeps track of what rate needs to be used
For this purpose an "identity" is associated with each real sensor
activation, so we can track them.
On start-up we check for gravity, linear-acceleration and
rotation-vector sensors, if they're not present in the HAL, we
synthetize them in sensor-service.
Change-Id: I841db2c1b37ef127ed571efa21732ecc5adf1800
Mathias Agopian [Mon, 15 Nov 2010 04:55:25 +0000 (20:55 -0800)]
Fix a race condition in sensormanager
the per-connection state assumed the main sensorservice
lock was held during access. This is however not true while
pre-processing the events just before sending them to clients.
Therefore, there was a small window during which this state
could be modified while being used.
we now have an internal lock that protects this state.
Change-Id: I594680f20f09d6a4f1f38f093a1d3f650dcef1be
Mathias Agopian [Thu, 11 Nov 2010 01:50:28 +0000 (17:50 -0800)]
record the last event received regardless of having clients or not
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
Mathias Agopian [Sat, 6 Nov 2010 02:12:58 +0000 (19:12 -0700)]
improve sensorservice dumpsys and increase the max sensor rate to 1 ms (1000Hz)
the increased maximum rate is needed for proper gyro integration, current gyro
parts can sample at up to 800Hz
Change-Id: Ide75f6d5bc7a0fdafeb2dafd72db39e7afb9e794
Jeff Brown [Tue, 14 Sep 2010 06:17:30 +0000 (23:17 -0700)]
Replace epoll() with poll() and rename PollLoop to Looper.
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
Mathias Agopian [Fri, 23 Jul 2010 05:19:43 +0000 (22:19 -0700)]
Report sensor events to BatteryStats service
Change-Id: I9b83aa709887aa658bc474391573f2d45b6c4eb2
Mathias Agopian [Fri, 23 Jul 2010 04:24:39 +0000 (21:24 -0700)]
SensorService handles last known state properly
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
Mathias Agopian [Thu, 22 Jul 2010 23:18:10 +0000 (16:18 -0700)]
filter sensor event by connection
we now don't send events down to a connection that has not
registered for this event.
Change-Id: I3fe507974d3e99293749bfec2ef871e8a0ee9600
Mathias Agopian [Wed, 21 Jul 2010 22:59:50 +0000 (15:59 -0700)]
propagate sensor event rate properly to the sensor HAL
Change-Id: I1abe4c0fcce423caab79208353fded4d57398227
Mathias Agopian [Wed, 21 Jul 2010 22:59:50 +0000 (15:59 -0700)]
propagate sensor event rate properly
Change-Id: I32e67d30e4295285a6827956cc8161b2025d70bc
Mathias Agopian [Tue, 20 Jul 2010 02:09:10 +0000 (19:09 -0700)]
SensorService doesn't crash if correct HAL is not present
Change-Id: I83700b1a1b43390f5830e1056572bfb16e58e8e4
Mathias Agopian [Mon, 19 Jul 2010 22:20:39 +0000 (15:20 -0700)]
Better dumpsys logs
Change-Id: Iae65a8547ee5815cc4c3b74d2c9ef17bed7f565d
Mathias Agopian [Mon, 19 Jul 2010 22:03:55 +0000 (15:03 -0700)]
Added partial support for repporting sensor activity to IBatteryStats
Change-Id: I2af319d89e49b0f2349ec9d8b0fccac80e9bc047