History log of /frameworks/base/core/java/android/hardware/SensorManager.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fb8909709979b883ff95b21db3e32666788637b4 16-May-2012 Mathias Agopian <mathias@google.com> fix SensorManager.getAngleChange() documentation

Bug: 6442517

Change-Id: I4b22540817560bdff134d2cc3274e3b39c92d3b1
/frameworks/base/core/java/android/hardware/SensorManager.java
4481d9c10ceaf3b886fb5cab1d20941932af5b0f 17-Apr-2012 Jeff Brown <jeffbrown@google.com> Move legacy sensor support to a new class.

Bug: 6339552
Change-Id: I2067b754348ac76b1e1f71608031be2c80fc31d2
/frameworks/base/core/java/android/hardware/SensorManager.java
25157e458d6e10b027d1ba6b78b0487156c9f57a 16-Apr-2012 Jeff Brown <jeffbrown@google.com> Refactor SensorManager to move non-API bits into a subclass.

Changed the SensorManager class so that it only contains API-related
bits including what's needed to support legacy sensors. Mostly just
moved stuff around. Making the class abstract is safe because
it does not have a visible constructor in the API.

One minor change is that the cache of sensor type to sensor lists
is now per instance of SensorManager instead of being static.
We can fix this if desired.

Another small change is that we bail out early from registerListener
if the listener has already been registered for the particular
sensor. This happened for both legacy and standard listeners.
The problem is that the ListenerDelegate maintains two lists of
sensors, one is a Map and the other is a List. Adding a sensor
twice causes one entry to be added to the Map and two entries to be
added to the List, but when the sensor is removed the next time, only
one entry is removed from the List, leaving it in an inconsistent
state.

Removed Sensor.getLegacyType() since the value it provides is only
needed in LegacyListener and we don't really save any significant
computation by caching it. Removing the field makes support for
legacy sensors a little more self-contained.

Bug: 6339552
Change-Id: I50d41ac97cf535924f2bfa2026d28547a4d00286
/frameworks/base/core/java/android/hardware/SensorManager.java
e0dbd002750856e55d637e883b629e09adfc8a4e 16-Feb-2012 Jeff Brown <jeffbrown@google.com> Mark input and sensor messages as asynchronous.

Set a barrier on traversals.

Vsync is still not enabled by default in this patch so there
should be no observable effect from these changes.

Change-Id: Ie12081b95a8f1e81ed686edf747cc62f2e044b7e
/frameworks/base/core/java/android/hardware/SensorManager.java
5263767cdae21f8f6968dfba974623b240746d6e 15-Sep-2011 Mathias Agopian <mathias@google.com> Tweak DELAY_UI for 16Hz to 15Hz

this allows us to hit the lower accel rate.

Change-Id: I21944ee82020cf4b80397b87803bc481ddf51931
/frameworks/base/core/java/android/hardware/SensorManager.java
0eab8214986faf6e5ba1982b8b01c4f06d61b3c4 08-Mar-2011 Mathias Agopian <mathias@google.com> fix [4026375] SensorManager quaternion functions can call sqrt with a negative number

Just make sure to clamp the argument to zero.

Bug: 4026375
Change-Id: I00c5f6c83659a290d5e1e191a1c8d25ec06834c2
/frameworks/base/core/java/android/hardware/SensorManager.java
f27ebdeb39affdc3ce0a1eb4d2bf1db2583ce834 15-Feb-2011 Mathias Agopian <mathias@google.com> Merge "fix [3452769] SensorEventListener can cause a java allocation at each received event [external]"
929ced35698152b84f12a8b3662f5e50cfd12913 15-Feb-2011 Mathias Agopian <mathias@google.com> fix [3452769] SensorEventListener can cause a java allocation at each received event [external]

increase the size of the SensorEvent pool from 1 to num_sensors*2.
and make the pool global instead of having an instance per SensorEventListener.

Change-Id: I1bcc53a9b07cd1f96fac6fe6e3b9da074e3cb1fd
/frameworks/base/core/java/android/hardware/SensorManager.java
7b6e4bd697e76bfc44e59ad42666e758c091b7bf 15-Feb-2011 Mathias Agopian <mathias@google.com> fix [3452750] Issue 14634: SensorManager.getRotationMatrixFromVector gets NaN-Values [external]

make sure to not pass negative numbers to sqrt().

Change-Id: Ifd200c781ae8a94c8a3c600401b60f4cf2430be3
related-bug: 3452750
/frameworks/base/core/java/android/hardware/SensorManager.java
c2b4e21320d85d48e45f6a76e4927adb380c85b8 17-Jan-2011 Mathias Agopian <mathias@google.com> fix [3355413] Gyro calls onAccuracyChanged and reports accuracy as UNRELIABLE

- make sure to call onAccuracyChanged only when it actually changes
- only call onAccuracyChanged on Magnetic and Orientation sensors, which
are the only ones to support it.
- for other sensors, call onAccuracyChanged only once with the
SENSOR_STATUS_ACCURACY_HIGH value

Change-Id: Ic861e3d48d3b98dab74ffebe2746576f5b69f371
/frameworks/base/core/java/android/hardware/SensorManager.java
0871ee0c6f43a7201ce49a66211c1c850eabeb6b 07-Dec-2010 Dirk Dougherty <ddougherty@google.com> Doc change: fix href to axis_globe_inverted orientation diagram.
/frameworks/base/core/java/android/hardware/SensorManager.java
7badd2c402f9e8e9fd13f6915ad2e32301f9f305 23-Nov-2010 Mathias Agopian <mathias@google.com> 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
/frameworks/base/core/java/android/hardware/SensorManager.java
f71384cd6141c50f589178d309db3ceeb848fb30 20-Nov-2010 Mathias Agopian <mathias@google.com> Fix SensorManager.getOrientation() documentation.

This function doesn't use the same reference coordinate system used
for the rotation matrix, unlike what the documentation previously
stated.

Change-Id: I38abeb74540d33b67f72993b54d7a00a73588dde
/frameworks/base/core/java/android/hardware/SensorManager.java
34884b409e24c1183b6be4f0611b8ea22e62dc10 04-Nov-2010 Kevin Powell <kpowell@invensense.com> [3163098] Fix bug in angleChange funtion which caused the returned angle change to be zeroall the time. The fix is to use PrevR instead of computing the difference between R and R.

Change-Id: I59cacab4c7108cfb4a17fd1021de7473e6faa74f
/frameworks/base/core/java/android/hardware/SensorManager.java
4d3cb63b9b9177b79c575ca1b21040cc42ee7879 17-Sep-2010 Mathias Agopian <mathias@google.com> part of fix for [3004226] Cannot end the call - Proximity sensor doesn't work

- In SensorEventQueue, only bail on errors from Looper::loopOnce
- Improve sensor error logging

Change-Id: Ib3cf8d5d9fdac8513a3d753155827e0feeda1662
/frameworks/base/core/java/android/hardware/SensorManager.java
ec33b82c42f3dd996a72b80359c87524b51ffb2a 15-Sep-2010 Mathias Agopian <mathias@google.com> fix [2931909] SensorManger breaks when using different SensorEventListener w/ the same sensors

- Sensor handle can now be arbitrary instead of being limited to 0-31
- make sure to disable sensors only when no listener uses them anymore

Change-Id: If656c8c24d9827a7db1de3b3aa89961abb7def0c
/frameworks/base/core/java/android/hardware/SensorManager.java
43c87e44fc0d7d7b37e039752c0dec093e227381 25-Aug-2010 Mathias Agopian <mathias@google.com> Improve Sensors documentation a bit

Change-Id: I6f4f9ebfaf1e7f461a795f717b9913e3a021e9d4
/frameworks/base/core/java/android/hardware/SensorManager.java
7a0541d6b803da02b8724b1d140d6ccaaec23a36 20-Jul-2010 Kevin Powell <kpowell@invensense.com> add new sensor types for handling gyro data and device orientation
more efficiently.

Change-Id: Ifbcf2caae0865eccf1c9b8060342185c22145a30
/frameworks/base/core/java/android/hardware/SensorManager.java
a6704d39b31417dc674d3866f43dad4ce3f850b1 18-Aug-2010 Mathias Agopian <mathias@google.com> Improve documentation of getAltitude

Change-Id: Ie6c61fa6018e54143cec6e65978df9abb48854d9
/frameworks/base/core/java/android/hardware/SensorManager.java
04d7e83e65e246e154b5b346e3eb0081b741ae88 30-Jul-2010 Mathias Agopian <mathias@google.com> Added SensorManager.getAltitude()

this is a helper function to calculate the altitude from the
pressure and pressure at sea level.

Change-Id: I3f6f14fee6190388f95afa36a66287e3d59eef9b
/frameworks/base/core/java/android/hardware/SensorManager.java
050b56244ff46d43e4886018d7cd20f0b1dc02b9 30-Jul-2010 Mathias Agopian <mathias@google.com> Added SensorManager.getMinDelay()

Exposed the new "min delay" sensor property through native and
java sensor apis. This allows the caller to know what is the
maximum rate at which a sensor can return events, or, if a sensor
works in "update" mode (events returned only when the value changes).

Also augmented SensorManager.regusterSensorEvent() so that it can
accept a value in microsecond in addition to the 4 constants already
defined.

Change-Id: If425e9979892666df8c989d7de3c362230fa19e0
/frameworks/base/core/java/android/hardware/SensorManager.java
1bf797857e025e8a71db86fb9e79765a767ec1eb 15-Jul-2010 Mathias Agopian <mathias@google.com> new SensorService

remove old sensor service and implement SensorManager
on top of the new (native) SensorManger API.

Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
/frameworks/base/core/java/android/hardware/SensorManager.java
0f791a799dc81d93935fd2597297cf7ac2c0a044 23-Jun-2010 Mathias Agopian <mathias@google.com> More improvements to the SensorManager documentation

Change-Id: I8ab79e8787402f0db572226029820b3cf605086f
/frameworks/base/core/java/android/hardware/SensorManager.java
74cde2cee9e53006a710f4e80700cd560c2d0e4d 17-Jun-2010 Mathias Agopian <mathias@google.com> Improve SensorManager documentation

this pass is mostly just formating.

Change-Id: Ica7dd014c301817c93e915c08b16da99769eaabb
/frameworks/base/core/java/android/hardware/SensorManager.java
7895da44e32e9c76e07663aae7084f11cbacbbdb 26-Feb-2010 Mathias Agopian <mathias@google.com> SensorManager: handle 270 and 180 rotation in the legacy APIs

Technically these APIs are deprecated, however old apps might still be using them
so we might as well make sure they work in all orientations.
/frameworks/base/core/java/android/hardware/SensorManager.java
210fc914db37b3cf77ebb3bf75b0b509a1ecb07c 26-Feb-2010 Mathias Agopian <mathias@google.com> [2472946] Sensor.TYPE_ORIENTATION returns inverted roll values

Fix the documentation to reflect reality and encourage developpers to use
SensorManager.getRotation() instead of using Sensor.TYPE_ORIENTATION
/frameworks/base/core/java/android/hardware/SensorManager.java
5cb70b54156fb305d579a1cc167424c8705bfdf7 26-Feb-2010 Dianne Hackborn <hackbod@google.com> Rename Display.getOrientation() to Display.getRotation().

Update various docs.
/frameworks/base/core/java/android/hardware/SensorManager.java
b3dc5eb4e4143b119491a05e89b186763979ef75 04-Feb-2010 Mathias Agopian <mathias@google.com> fix [2313526] sensor enable race condition

Make sure we wait until the SensorThread is running an has open the sensors fd.
Also handle errors when/if this fails.
/frameworks/base/core/java/android/hardware/SensorManager.java
f5d95cbc1a6974afeb4d3155bdaa8dae55722a39 08-Jan-2010 Joe Onorato <joeo@android.com> less log spew
/frameworks/base/core/java/android/hardware/SensorManager.java
e417158c06c81c8c4dc6794c5421b711e671c7e3 16-Dec-2009 Mathias Agopian <mathias@google.com> fix [2330211] sensors thread priority too low

bump the sensor thread priority to URGENT_DISPLAY. Events will be enqueued
in the UI (or other user provided) thread, which runs at DISPLAY prio.
/frameworks/base/core/java/android/hardware/SensorManager.java
4a51c20ce607c74914f90fd897f04080121ac13b 22-Aug-2009 Dianne Hackborn <hackbod@google.com> I am getting tired of the java doc warnings, so fix them.

Change-Id: I2205eebae419eaf4a0992c9f5b7cd807eb843fe1
/frameworks/base/core/java/android/hardware/SensorManager.java
270e87f71abc2edf446dbec20c725c823e8c7f37 22-May-2009 Mike Lockwood <lockwood@android.com> Sensors: Use a native_handle for the data channel instead of a single file descriptor.

This eliminates the requirement that all sensors share a single file descriptor.
This, along with concurrent changes in other projects, fixes bugs b/1614524 and b/1614481

Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/java/android/hardware/SensorManager.java
287b30920102b5466efa53a2f17ed69f2c776c16 28-Apr-2009 Mathias Agopian <mathias@google.com> fix 1812272 SensorManager method returns hidden object
/frameworks/base/core/java/android/hardware/SensorManager.java
5a0cb42f3ffc10502233d94fe4fae629c3111c7b 02-Apr-2009 Chris Tate <> AI 144135: am: CL 144134 Fix issue 1750132 - SensorManager listener 'rate' parameter units are undocumented
Original author: ctate
Merged from: //branches/cupcake/...

Automated import of CL 144135
/frameworks/base/core/java/android/hardware/SensorManager.java
6dee6243bf5ecb96291e62ece7d736c5aee1e505 26-Mar-2009 Andreas Huber <> Automated import from //branches/donutburger/...@142801,142801
/frameworks/base/core/java/android/hardware/SensorManager.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/hardware/SensorManager.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/hardware/SensorManager.java
15ab3eae2ec3d73b3e8aa60b33ae41445bf83f4b 20-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132569
/frameworks/base/core/java/android/hardware/SensorManager.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/core/java/android/hardware/SensorManager.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/android/hardware/SensorManager.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/hardware/SensorManager.java