OSDN Git Service

android-x86/frameworks-native.git
11 years agoMerge "Minimal changes to support multi-display HWC" into jb-mr1-dev
Jesse Hall [Tue, 31 Jul 2012 04:20:04 +0000 (21:20 -0700)]
Merge "Minimal changes to support multi-display HWC" into jb-mr1-dev

11 years agoMerge "log more info on fence sync_merge error" into jb-mr1-dev
Mathias Agopian [Mon, 30 Jul 2012 22:21:59 +0000 (15:21 -0700)]
Merge "log more info on fence sync_merge error" into jb-mr1-dev

11 years agolog more info on fence sync_merge error
Mathias Agopian [Mon, 30 Jul 2012 22:10:35 +0000 (15:10 -0700)]
log more info on fence sync_merge error

also fix a typo where the wrong value was passed to sterror.

Change-Id: I4df2abe582e14c8f816b65818f4593a6bd3c23ea

11 years agoMerge remote-tracking branch 'goog/jb-dev-mako' into jb-mr1-dev
Ed Heyl [Sat, 28 Jul 2012 16:55:54 +0000 (09:55 -0700)]
Merge remote-tracking branch 'goog/jb-dev-mako' into jb-mr1-dev

Conflicts:
include/media/hardware/CryptoAPI.h

Change-Id: I84bf34edbef000558f088bbf1d1e5b55d6217d2e

11 years agoam 5e966ef6: Reconcile with jb-release
The Android Open Source Project [Fri, 27 Jul 2012 22:45:33 +0000 (15:45 -0700)]
am 5e966ef6: Reconcile with jb-release

* commit '5e966ef64bda21a14b5f835040f515932c52e966':

11 years agoReconcile with jb-release
The Android Open Source Project [Fri, 27 Jul 2012 21:52:00 +0000 (14:52 -0700)]
Reconcile with jb-release

Change-Id: Ied4d1f919062ea2abeee45ce4ecbc92a105b8f3d

11 years agoMinimal changes to support multi-display HWC
Jesse Hall [Thu, 26 Jul 2012 05:15:40 +0000 (22:15 -0700)]
Minimal changes to support multi-display HWC

Change-Id: I5efea78ac381c3e3118e6e92b508f336233ac319

11 years agoget rid of the shared-memory control block
Mathias Agopian [Thu, 26 Jul 2012 01:56:13 +0000 (18:56 -0700)]
get rid of the shared-memory control block

Change-Id: If814060aca1d2ff2619d4adcd57296983d207f7f

11 years agohopefully fixe a race condition in sf initialization
Mathias Agopian [Thu, 26 Jul 2012 04:12:12 +0000 (21:12 -0700)]
hopefully fixe a race condition in sf initialization

if we received a vsync event during SF init, we could crash
as not all objects were ready to go.

Change-Id: Ie11b46e3eb1b37a709dd8757843d444f93dd0189

11 years agosplit HWComposer out of DisplayHardware
Mathias Agopian [Wed, 25 Jul 2012 05:46:10 +0000 (22:46 -0700)]
split HWComposer out of DisplayHardware

we will only ever have a single instance of HWComposer, so
it's now an attribute of SurfaceFlinger, instead of being part
of DisplayHardware.

DisplayHardware now just represents a "display" (it should be renamed).

Change-Id: Iec191e57686868e1df6daa8b880a286c9fefde56

11 years agoget rid of ro.sf.hwrotation, it's not used anymore
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

11 years agoadd a layerStack attribute to Layers.
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

11 years agoupdate SF binder protocol to support setting display attributes
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

11 years agomerge in jb-release history after reset to jb-dev
The Android Automerger [Wed, 25 Jul 2012 03:23:13 +0000 (20:23 -0700)]
merge in jb-release history after reset to jb-dev

11 years agoSurfaceFlinger cleanup
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

11 years agoFixed bug in opengl es binding generation
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

11 years agoMerge "glgen stubs to fix bad methods in gles20 bindings"
Mathias Agopian [Mon, 23 Jul 2012 23:25:43 +0000 (16:25 -0700)]
Merge "glgen stubs to fix bad methods in gles20 bindings"

11 years agoMerge "Update the EGL_ANDROID_fence_sync spec."
Jamie Gennis [Mon, 23 Jul 2012 23:21:58 +0000 (16:21 -0700)]
Merge "Update the EGL_ANDROID_fence_sync spec."

11 years agoUpdate 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

11 years agoIncrement iterator on early-out too
Jesse Hall [Mon, 23 Jul 2012 20:11:19 +0000 (13:11 -0700)]
Increment iterator on early-out too

Bug: 6860046
Change-Id: I82f9e4062cb58d5479c9d8dc5f2f0770a1dcc605

12 years agoMerge "Handle empty HWC layer list when composing"
Jesse Hall [Sun, 22 Jul 2012 01:51:20 +0000 (18:51 -0700)]
Merge "Handle empty HWC layer list when composing"

12 years agoHandle 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

12 years agoMerge "Add elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible."
Nick Pelly [Fri, 20 Jul 2012 16:46:14 +0000 (09:46 -0700)]
Merge "Add elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible."

12 years agoglgen stubs to fix bad methods in gles20 bindings
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

12 years agoAdd elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible.
Nick Pelly [Thu, 19 Jul 2012 16:17:24 +0000 (09:17 -0700)]
Add elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible.

Change-Id: I4231c8ca32663e6e2cb5b7c126d091f837373807

12 years agofactor EGL/GL and surface creation out of DisplayHardware
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

12 years agomVisibleLayersSortedByZ is now maintained per display
Mathias Agopian [Wed, 11 Jul 2012 20:48:17 +0000 (13:48 -0700)]
mVisibleLayersSortedByZ is now maintained per display

Change-Id: Idcdb77eba1a3f99b3e4b2150128a82acaffcd2a8

12 years agoMerge "OpenGL bindings fix for methods with iobuffer args"
Mathias Agopian [Thu, 19 Jul 2012 01:31:41 +0000 (18:31 -0700)]
Merge "OpenGL bindings fix for methods with iobuffer args"

12 years agoMerge "Remove @hide from the generated EGL 1.4 API"
Mathias Agopian [Thu, 19 Jul 2012 01:30:45 +0000 (18:30 -0700)]
Merge "Remove @hide from the generated EGL 1.4 API"

12 years agoam f455c9a2: merge in jb-release history after reset to jb-dev
The Android Automerger [Wed, 18 Jul 2012 01:12:12 +0000 (18:12 -0700)]
am f455c9a2: merge in jb-release history after reset to jb-dev

* commit 'f455c9a267332960334794428c2abc5f716ee6ea':
  SF could get stuck waiting for vsync when turning the screen off
  libgui: improve some logging and dumping
  libgui: improve some logging and dumping
  Workaround for add_tid_to_cgroup failed to write
  make sure to repaint the screen when screen turns on
  Add sdcard_r group to dumpstate.
  Ensure that /data/anr/traces.txt is world-writable
  displayhardware: fix not obeying ro.sf.lcd_density when specified

12 years agoMerge from jb-dev for "sample video corruption in MediaCodec mode." DO NOT MERGE
Edwin Wong [Tue, 17 Jul 2012 21:38:28 +0000 (14:38 -0700)]
Merge from jb-dev for "sample video corruption in MediaCodec mode." DO NOT MERGE

jb-dev commit: fa2b8f243eb048fb2b8e5a14356190f69eb31a36

Change-Id: Ic2a28663d25e3007c95e15ecbb0d44b820045f85
related-to-bug: 6732061

12 years agoMerge "Remove unused layer flags."
Jeff Brown [Mon, 16 Jul 2012 23:18:23 +0000 (16:18 -0700)]
Merge "Remove unused layer flags."

12 years agoRemove unused layer flags.
Jeff Brown [Mon, 16 Jul 2012 23:05:50 +0000 (16:05 -0700)]
Remove unused layer flags.

Change-Id: Ia85365f18770a9a2c0a0e30ae56b6c2226d41be6

12 years agoMerge "surfaceflinger: call into hardware composer to blank screen"
Colin Cross [Mon, 16 Jul 2012 22:58:28 +0000 (15:58 -0700)]
Merge "surfaceflinger: call into hardware composer to blank screen"

12 years agoMerge "Remove freeze(), unfreeze() and setFreezeTint()."
Jeff Brown [Mon, 16 Jul 2012 22:53:12 +0000 (15:53 -0700)]
Merge "Remove freeze(), unfreeze() and setFreezeTint()."

12 years agoMerge "Remove freezeDisplay(), which is no-op."
Jeff Brown [Mon, 16 Jul 2012 22:53:07 +0000 (15:53 -0700)]
Merge "Remove freezeDisplay(), which is no-op."

12 years agoRemove freeze(), unfreeze() and setFreezeTint().
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

12 years agoRemove freezeDisplay(), which is no-op.
Jeff Brown [Mon, 16 Jul 2012 21:58:11 +0000 (14:58 -0700)]
Remove freezeDisplay(), which is no-op.

Change-Id: I2b70249a1545636fd6d98b58057b22f9529cad21

12 years agoam 647336c7: am e0daeb39: Fixed sample video corrupted in MediaCodec mode.
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.

12 years agoRemove @hide from the generated EGL 1.4 API
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

12 years agosurfaceflinger: call into hardware composer to blank screen
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

12 years agoam e0daeb39: Fixed sample video corrupted in MediaCodec mode.
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.

12 years agoFixed 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

12 years agoOpenGL bindings fix for methods with iobuffer args
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

12 years agoMerge "one more step towards multiple display support"
Mathias Agopian [Thu, 12 Jul 2012 00:19:00 +0000 (17:19 -0700)]
Merge "one more step towards multiple display support"

12 years agoMerge "improve glgen tool to support EGL1.4"
Mathias Agopian [Wed, 11 Jul 2012 23:07:39 +0000 (16:07 -0700)]
Merge "improve glgen tool to support EGL1.4"

12 years agoimprove 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

12 years agoone more step towards multiple display support
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

12 years agolibs/ui: Add support for triple framebuffers
Naseer Ahmed [Fri, 29 Jun 2012 19:02:32 +0000 (12:02 -0700)]
libs/ui: Add support for triple framebuffers

Change-Id: I90dd38deeeda9a3785b87286cc7d252c6f948750

12 years agoFix check for fence merge success
Jesse Hall [Tue, 3 Jul 2012 20:41:54 +0000 (13:41 -0700)]
Fix check for fence merge success

Change-Id: I9b16526ebfe4ffabf7c4372cca9b192ce046aa21

12 years agoOnly set acquire fences on overlay layers
Jesse Hall [Mon, 2 Jul 2012 23:49:28 +0000 (16:49 -0700)]
Only set acquire fences on overlay layers

Change-Id: I08e8173f83580de5a4e43a0ba5ea03e5ec6e8782

12 years agoPass fence to HWC on first use of buffer
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

12 years agoReturn fence from acquireBuffer
Jesse Hall [Thu, 28 Jun 2012 21:27:53 +0000 (14:27 -0700)]
Return fence from acquireBuffer

Change-Id: Iab22054c1dc4fd84affab3cc5bbdcd5a1e689666

12 years agoPass fences with buffers from SurfaceTextureClient
Jesse Hall [Thu, 28 Jun 2012 19:52:05 +0000 (12:52 -0700)]
Pass fences with buffers from SurfaceTextureClient

Change-Id: I09b49433788d01e8b2b3684bb4d0112be29538d3

12 years agoMerge "Clarify aborted updateTexImage use of fences"
Jesse Hall [Fri, 29 Jun 2012 16:54:25 +0000 (09:54 -0700)]
Merge "Clarify aborted updateTexImage use of fences"

12 years agoMerge "Return fence to client in dequeuBuffer"
Jesse Hall [Fri, 29 Jun 2012 16:54:08 +0000 (09:54 -0700)]
Merge "Return fence to client in dequeuBuffer"

12 years agoadd a way to enable debugging sensors at runtime
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

12 years agoimprove sensor fusion
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

12 years agoadd some comments
Mathias Agopian [Thu, 28 Jun 2012 01:51:43 +0000 (18:51 -0700)]
add some comments

Change-Id: Ia2e2c9531715fc2bd5b51c4dc58389e01abfe7e6

12 years agoget rid of GraphicPlane
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.

12 years agoClarify aborted updateTexImage use of fences
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

12 years agoReturn fence to client in dequeuBuffer
Jesse Hall [Mon, 25 Jun 2012 20:54:23 +0000 (13:54 -0700)]
Return fence to client in dequeuBuffer

Change-Id: Ic19750793ad993f0e85391f3cabd743ba565d4c9

12 years agoFirst prototype atttempting to support an external display
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

12 years agomove sensorservice from frameworks/base to frameworks/native
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

12 years agosmall improvement to sensor fusion
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

12 years agofix a potential buffer overflow in sensorservice
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

12 years agoFix a stack corruption in sensorservice
Mathias Agopian [Wed, 30 May 2012 02:46:14 +0000 (19:46 -0700)]
Fix a stack corruption in sensorservice

Bug: 6576732
Change-Id: If0f2fb0d0c35b932fb77cd262e676042145b28f9

12 years agofix a typo causing sensor event to be sorted in reverse chronological order
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

12 years agousea socketpair instead of a pipe in BitTube
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

12 years agoRename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
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

12 years agoRename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
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

12 years agoRename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
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

12 years agoRename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
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

12 years agohandle EINTR when calling sensor HAL's poll function
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

12 years agoSensorService now always clamps the requested rate
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

12 years agofix an issue where SensorService could request an invalid sensor delay
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

12 years agoRename SensorChannel to BitTube
Mathias Agopian [Fri, 21 Oct 2011 01:42:02 +0000 (18:42 -0700)]
Rename SensorChannel to BitTube

12 years agoimprove sensorservice dumpsys
Mathias Agopian [Wed, 14 Sep 2011 23:43:34 +0000 (16:43 -0700)]
improve sensorservice dumpsys

Change-Id: I8b53d5cab884c3aca16d95df5fbf288368d52e8b

12 years agoimprove sensorservice_test output
Mathias Agopian [Tue, 13 Sep 2011 05:16:01 +0000 (22:16 -0700)]
improve sensorservice_test output

Change-Id: I6248b6f1f001fedec1bddcddfcd2b381d9bb4bf4

12 years agoFix a few style issues and remove LOG spam
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

12 years agoMore error checks to avoid div by zero.
Michael Johnson [Fri, 19 Aug 2011 18:47:08 +0000 (11:47 -0700)]
More error checks to avoid div by zero.

Change-Id: I18e5b72d02bf5420c14334d3a03f18fa40572d31

12 years agoFix occasional fusion divergence by detecting it and resetting the fusion.
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

12 years agohave the sensorsevice test print the delay of the first received event
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

12 years agosilence sensorservice when it's dropping events
Mathias Agopian [Thu, 21 Jul 2011 01:51:15 +0000 (18:51 -0700)]
silence sensorservice when it's dropping events

Change-Id: Ib05862e545aa780821aa605e45ab189f530494b7

12 years agosensorservice: be more robust when there are no sensor h/w
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

12 years agoRemove the simulator target from all makefiles. Bug: 5010576
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

12 years agoPermissionCache caches permission checks
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

12 years agocleanup Kalman filter parameters, add/fix comments/units
Mathias Agopian [Mon, 13 Jun 2011 23:00:49 +0000 (16:00 -0700)]
cleanup Kalman filter parameters, add/fix comments/units

Change-Id: Iedcae7164af8f7ea0e048ea7c72d0f35d16d739f

12 years agoimprove orientation sensor with gyro data
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

12 years agouse quaternions instead of MRPs
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

12 years ago9-axis sensor fusion with Kalman filter
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

12 years agoFix a few issues with sensors reference-counting
Mathias Agopian [Fri, 27 May 2011 23:23:58 +0000 (16:23 -0700)]
Fix a few issues with sensors reference-counting

12 years agoFix a crasher in SensorService
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

12 years agoframeworks/base: remove LOCAL_PRELINK_MODULE
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>
12 years agofix [4025681] continuous sensors should not try to send an event as soon as they...
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

12 years agofix [3421350] Killing a game that uses the accelerometer renders the device unable...
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

12 years agofix [3369027] Sensor.TYPE_ROTATION_VECTOR is unstable and returns NaNs when running...
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

12 years agofix [3237242] sensormanager sensor active count gets out of sync
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

12 years agoUses 4-th order low-pass for extracting gravity.
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

12 years agoallow rotation-vector to have 4 components
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