summaryrefslogtreecommitdiffstats
path: root/core/java/android/hardware/SensorManager.java
Commit message (Collapse)AuthorAgeFilesLines
* fix [4026375] SensorManager quaternion functions can call sqrt with a ↵Mathias Agopian2011-03-071-2/+2
| | | | | | | | | negative number Just make sure to clamp the argument to zero. Bug: 4026375 Change-Id: I00c5f6c83659a290d5e1e191a1c8d25ec06834c2
* Merge "fix [3452769] SensorEventListener can cause a java allocation at each ↵Mathias Agopian2011-02-151-32/+56
|\ | | | | | | received event [external]"
| * fix [3452769] SensorEventListener can cause a java allocation at each ↵Mathias Agopian2011-02-141-32/+56
| | | | | | | | | | | | | | | | | | 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
* | fix [3452750] Issue 14634: SensorManager.getRotationMatrixFromVector gets ↵Mathias Agopian2011-02-141-1/+2
|/ | | | | | | | | NaN-Values [external] make sure to not pass negative numbers to sqrt(). Change-Id: Ifd200c781ae8a94c8a3c600401b60f4cf2430be3 related-bug: 3452750
* fix [3355413] Gyro calls onAccuracyChanged and reports accuracy as UNRELIABLEMathias Agopian2011-01-161-3/+26
| | | | | | | | | | - 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
* Doc change: fix href to axis_globe_inverted orientation diagram.Dirk Dougherty2010-12-061-1/+1
|
* allow rotation-vector to have 4 componentsMathias Agopian2010-11-301-7/+14
| | | | | | | | | | | | - 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
* Fix SensorManager.getOrientation() documentation.Mathias Agopian2010-11-191-3/+13
| | | | | | | | This function doesn't use the same reference coordinate system used for the rotation matrix, unlike what the documentation previously stated. Change-Id: I38abeb74540d33b67f72993b54d7a00a73588dde
* [3163098] Fix bug in angleChange funtion which caused the returned angle ↵Kevin Powell2010-11-031-18/+18
| | | | | | change to be zeroall the time. The fix is to use PrevR instead of computing the difference between R and R. Change-Id: I59cacab4c7108cfb4a17fd1021de7473e6faa74f
* part of fix for [3004226] Cannot end the call - Proximity sensor doesn't workMathias Agopian2010-09-161-5/+7
| | | | | | | - In SensorEventQueue, only bail on errors from Looper::loopOnce - Improve sensor error logging Change-Id: Ib3cf8d5d9fdac8513a3d753155827e0feeda1662
* fix [2931909] SensorManger breaks when using different SensorEventListener ↵Mathias Agopian2010-09-161-29/+58
| | | | | | | | | 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
* Improve Sensors documentation a bitMathias Agopian2010-08-251-1/+18
| | | | Change-Id: I6f4f9ebfaf1e7f461a795f717b9913e3a021e9d4
* add new sensor types for handling gyro data and device orientationKevin Powell2010-08-201-0/+177
| | | | | | more efficiently. Change-Id: Ifbcf2caae0865eccf1c9b8060342185c22145a30
* Improve documentation of getAltitudeMathias Agopian2010-08-181-1/+16
| | | | Change-Id: Ie6c61fa6018e54143cec6e65978df9abb48854d9
* Added SensorManager.getAltitude()Mathias Agopian2010-07-291-7/+30
| | | | | | | this is a helper function to calculate the altitude from the pressure and pressure at sea level. Change-Id: I3f6f14fee6190388f95afa36a66287e3d59eef9b
* Added SensorManager.getMinDelay()Mathias Agopian2010-07-291-5/+8
| | | | | | | | | | | | | 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
* new SensorServiceMathias Agopian2010-07-191-132/+71
| | | | | | | remove old sensor service and implement SensorManager on top of the new (native) SensorManger API. Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
* More improvements to the SensorManager documentationMathias Agopian2010-07-021-87/+159
| | | | Change-Id: I8ab79e8787402f0db572226029820b3cf605086f
* Improve SensorManager documentationMathias Agopian2010-06-161-218/+378
| | | | | | this pass is mostly just formating. Change-Id: Ica7dd014c301817c93e915c08b16da99769eaabb
* SensorManager: handle 270 and 180 rotation in the legacy APIsMathias Agopian2010-02-261-2/+23
| | | | | 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.
* [2472946] Sensor.TYPE_ORIENTATION returns inverted roll valuesMathias Agopian2010-02-261-0/+2
| | | | | Fix the documentation to reflect reality and encourage developpers to use SensorManager.getRotation() instead of using Sensor.TYPE_ORIENTATION
* Rename Display.getOrientation() to Display.getRotation().Dianne Hackborn2010-02-261-7/+11
| | | | Update various docs.
* fix [2313526] sensor enable race conditionMathias Agopian2010-02-041-17/+35
| | | | | Make sure we wait until the SensorThread is running an has open the sensors fd. Also handle errors when/if this fails.
* less log spewJoe Onorato2010-01-081-2/+2
|
* fix [2330211] sensors thread priority too lowMathias Agopian2009-12-151-1/+1
| | | | | 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.
* I am getting tired of the java doc warnings, so fix them.Dianne Hackborn2009-08-241-10/+30
| | | | Change-Id: I2205eebae419eaf4a0992c9f5b7cd807eb843fe1
* Sensors: Use a native_handle for the data channel instead of a single file ↵Mike Lockwood2009-05-231-21/+51
| | | | | | | | | 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>
* fix 1812272 SensorManager method returns hidden objectMathias Agopian2009-04-271-4/+10
|
* AI 144135: am: CL 144134 Fix issue 1750132 - SensorManager listener 'rate' ↵Chris Tate2009-04-011-3/+8
| | | | | | | | | parameter units are undocumented Original author: ctate Merged from: //branches/cupcake/... Automated import of CL 144135
* Automated import from //branches/donutburger/...@142801,142801Andreas Huber2009-03-251-9/+11
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+1462
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-1462/+0
|
* auto import from //branches/cupcake/...@132569The Android Open Source Project2009-02-201-0/+18
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-5/+10
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-273/+1093
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+619