History log of /frameworks/native/services/sensorservice/SensorDevice.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6a2d3a06caa337857cf60cfc70a9a78909ad3608 21-Dec-2015 Peng Xu <pengxu@google.com> Fix sensor uuid, retrofit recent event logger

Fix an issue that causes uuid field not being initialzed in
sensorservice.

MostRecentEventLogger in sensorservice is migrated to use RingBuffer
instead of a custom circular buffer. This is expected to improve
readability and maintainability of code.

Dumpsys print format is retouched to offer more information in easier
to read format.

Bug: 28305085

Change-Id: I190e43350b60a22a9fccb92a95d6eab06a471560
/frameworks/native/services/sensorservice/SensorDevice.cpp
2576cb63b3fe1592f54816625036566b9eb0793a 20-Jan-2016 Peng Xu <pengxu@google.com> Dynamic Sensor Discovery implementation

Defined the dynamic sensor meta data type and UUID of sensor.

Implementation in sensorservice and the native SensorManager to
support Dynamic sensor discovery.

Change-Id: I9df2f2ae51d46cd946a9757393f7a60b52cc4fb8
/frameworks/native/services/sensorservice/SensorDevice.cpp
d4036b6b7f9609fe09efabdbfbb8c8f9428f76f7 28-Jul-2015 Andreas Gampe <agampe@google.com> SensorService: Fix some warnings

For build-system CFLAGS clean-up, remove unused variables.

Also fix some warnings related to format strings, and signed
comparisons.

Bug: 18632512
Change-Id: I5e48dce36678c12069c0e162b920870de81b89f2
/frameworks/native/services/sensorservice/SensorDevice.cpp
18d6d51a00897988e3347b130f533e9ffdd8c365 18-Jun-2015 Aravind Akella <aakella@google.com> More information in sensor bugreports.

i) Log last 20 activations/deactivations of sensors.
ii) Increase logging upto 50 events for accelerometer, step_counter and significant motion.

Change-Id: I3966ed0abda8b705f3d16e94a9370fa1b97baa57
/frameworks/native/services/sensorservice/SensorDevice.cpp
af8ed3f06cf5a0fd37357b438da803f53f33fa56 12-May-2015 Aravind Akella <aakella@google.com> Merge "Improve logging in SensorService dump output." into mnc-dev
444f2675728dde36378beb8e67a94f86ebf1ca46 07-May-2015 Aravind Akella <aakella@google.com> Improve logging in SensorService dump output.

Maintain a per sensor circular buffer of last 10 sensor_events and the wall clock time
at which each event is received.

Change-Id: Ia50c825ab5a7aaf0932ce7dce7ac8b9be7071e77
/frameworks/native/services/sensorservice/SensorDevice.cpp
b412f6e203b38f8047f760261a5e3dc6d0722f08 30-Apr-2015 Svetoslav <svetoslavganov@google.com> Add body sensors app op - framework native

Change-Id: I727a2bb1e28ae9158f2df9c74dd0aee977dfd47f
/frameworks/native/services/sensorservice/SensorDevice.cpp
a9e6cc387072e25706a6d847a97b02a6f25a918b 17-Apr-2015 Aravind Akella <aakella@google.com> Enable data injection mode in SensorService.

Change-Id: I0cd32a017235c31c54816e4a357ce3b988350ed6
/frameworks/native/services/sensorservice/SensorDevice.cpp
4949c50372de4c7fdb57de1dc0c1f5bb3ac463eb 12-Feb-2015 Aravind Akella <aakella@google.com> Support restricted mode in SensorService.

In restricted mode, only CTS tests can register for sensors or call flush() on them. The requests
from other applications will be ignored.

Change-Id: Ieb923df3e0cfe3390fe2d052af776da79589744b
/frameworks/native/services/sensorservice/SensorDevice.cpp
6c2664ae34fd582bc174d3c83e2b18e895ca2496 13-Aug-2014 Aravind Akella <aakella@google.com> SensorService fixes.

1) Flush should only be received by the app calling flush(). Maintain
a queue of all flush() calls and send flush_complete events in that
order.
2) Log warnings for older HALs. Remove batch() calls with DRY_RUN flag.
3) Reallocate event cache when more sensors register and the desired
maxCacheSize increases. Clear NEEDS_ACK flag in the buffer whenever
there is a write() failure.
4) More dump information. Add wake-up flag, maxDelay and timestamps for
sensor events.

Bug: 16874778
Change-Id: I195646191059fd31f75f2f07886c0f98bf9b509a
/frameworks/native/services/sensorservice/SensorDevice.cpp
c46422ed2bf2e452d878a45735f4d37917008843 12-Jun-2014 Mark Salyzyn <salyzyn@google.com> am 20914f0a: am a4e345e1: Merge "sensorservice: 64-bit compile issues"

* commit '20914f0ad3691d977f61f1d4b92b49535e8f6f33':
sensorservice: 64-bit compile issues
db45861ff4b636b9dd833d622dd64e2ad24b0645 10-Jun-2014 Mark Salyzyn <salyzyn@google.com> sensorservice: 64-bit compile issues

Change-Id: Ied7b779f39e71d041791729f7355b052b63903c5
/frameworks/native/services/sensorservice/SensorDevice.cpp
9a844cf78f09953145200b4074d47589257a408c 12-Feb-2014 Aravind Akella <aakella@google.com> Enable wakeup sensors.

SensorService should hold a wakelock till the app reads events from a wakeup sensor. Currently drivers hold a wakelock with a
timeout while delivering events from a wake up sensor like Significant Motion. This hack can be removed now.

Bug: 9774884
Change-Id: If3b5acb99c9cf0cd29012fcfa9d6b04c74133d01
/frameworks/native/services/sensorservice/SensorDevice.cpp
92dc3fc52cf097bd105460cf377779bdcf146d62 12-Mar-2014 Mark Salyzyn <salyzyn@google.com> native frameworks: 64-bit compile issues

- Fix format (print/scanf)
- Suppress unused argument warning messages (bonus)

Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
/frameworks/native/services/sensorservice/SensorDevice.cpp
724d91d778e71c8186399f4955de14b54812b3ed 27-Jun-2013 Aravind Akella <aakella@google.com> Sensor batching. Changes to the native code.

Bug: 10109508
Change-Id: I7333f3aac76125a8226a4c99c901fb904588df04
/frameworks/native/services/sensorservice/SensorDevice.cpp
cdd7d8bc145bbbd21a1689ed87a381287aeec229 12-Jul-2013 Mathias Agopian <mathias@google.com> resolved conflicts for merge of 00aea5c5 to master

Change-Id: Ie1769be863ee2d411eae451907a928db57882e14
ac9a96da65f6eae4513654adaad8a457d1c1575c 12-Jul-2013 Mathias Agopian <mathias@google.com> fix a dead-lock in sensorservice

sensorservice would deadlock if for some reason
a sensor failed to enable.

simplifed the code a bit, and made it behave a little
closer to mr1.1 -- I couldn't convince myself that
some changes in how locks were used were correct.

Bug: 9794362
Change-Id: I6110f5dbb67e543f1c71d127de2299232badb36a
/frameworks/native/services/sensorservice/SensorDevice.cpp
ba02cd2f6cc3f59adf66cb2b9176bfe6c9e382d1 04-Jul-2013 Mathias Agopian <mathias@google.com> improve sensorservice's dumpsys

it now displays the reported trigger mode properly, as well as
the number and type of the last received data

Change-Id: I2ff64b32ab71f1332bc2e09671c8c02bb9550490
/frameworks/native/services/sensorservice/SensorDevice.cpp
4c01b1ad80e084f0cd1057f89fdd1fcedf19dd96 17-Apr-2013 Jaikumar Ganesh <jaikumar@google.com> Fix activation issue with auto disabled sensors.

Auto disabled sensors get auto disabled after trigger.
An activation after this wasn't working because the
state was not being reset.

b/8609561

Change-Id: If72c9f27345e91671d7ad0a7a066f6dc3d255b78
/frameworks/native/services/sensorservice/SensorDevice.cpp
4342fdf14ffb792a36c1de25ad14b745df628da2 09-Apr-2013 Jaikumar Ganesh <jaikumar@google.com> Sensor changes.

1. Some sensors can wake up the AP. Add wakelocks.
2. Handle backward compatibility for rotation vector
heading accuracy.
3. Cleanup auto disabled sensors.
4. Fix race condition between enable and dispatch.

Change-Id: I39dddf12e208d83cd288201986ee994312555820
/frameworks/native/services/sensorservice/SensorDevice.cpp
787ac1b388f144f5e6dd38f8b807866a5256dafc 19-Sep-2012 Mathias Agopian <mathias@google.com> improve sensor battery usage tracking

until now we were tracking when a sensors was
physically enabled or disabled and we were reporting
that to the BattaryService.

this wasn incorrect because we could have several different
apps enabling the same sensor, so the accounting by the
battery service would be incorrect in that case (depending
on the order in which these apps disabled said sensor).

BatteryService tracks sensors per uid, however SensorService
does this per binder connection, so we could have several
binder connections for the same uid, to solve this we keep
a list of sensor/uid -> count, which is the bulk of this
change.

Bug: 6661604
Change-Id: I561c198c42ba1736a8671bdacda4c76d72b9dd6f
/frameworks/native/services/sensorservice/SensorDevice.cpp
f5a1230d322c14c42331d0a1536b50c87742973b 06-Jan-2012 Steve Block <steveblock@google.com> 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
/frameworks/native/services/sensorservice/SensorDevice.cpp
a551237de142549fb8a6608ee9d2fbf4b7ca2ebf 20-Dec-2011 Steve Block <steveblock@google.com> 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
/frameworks/native/services/sensorservice/SensorDevice.cpp
1a62301fc58cd2af18239b0415813461bf5fc41b 10-Nov-2011 Mathias Agopian <mathias@google.com> 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
/frameworks/native/services/sensorservice/SensorDevice.cpp
667102f6b072582fe497599e0b760f9fc94ceffa 15-Sep-2011 Mathias Agopian <mathias@google.com> improve sensorservice dumpsys

Change-Id: I8b53d5cab884c3aca16d95df5fbf288368d52e8b
/frameworks/native/services/sensorservice/SensorDevice.cpp
984826cc158193e61e3a00359ef4f6699c7d748a 18-May-2011 Mathias Agopian <mathias@google.com> 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
/frameworks/native/services/sensorservice/SensorDevice.cpp
a1b7db95b6ccf5be9d8dfaac1b8f45494813edc0 28-May-2011 Mathias Agopian <mathias@google.com> Fix a few issues with sensors reference-counting
/frameworks/native/services/sensorservice/SensorDevice.cpp
50b66767f6c5635430483393e17d15969dfe2f05 30-Nov-2010 Mathias Agopian <mathias@google.com> 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
/frameworks/native/services/sensorservice/SensorDevice.cpp
f001c92436b4a66eb7687286325ced7f10c9f917 12-Nov-2010 Mathias Agopian <mathias@google.com> 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
/frameworks/native/services/sensorservice/SensorDevice.cpp