b4373ac9f53e3a6edee915715101d535e1a851a1 |
|
30-Oct-2014 |
Aravind Akella <aakella@google.com> |
Add a timeout for releasing SensorService wake_lock. If SensorService is holding a wake_lock and there are no acknowledgements from ANY app within 5 seconds, release the wake_lock and reset the wake_lock refcounts for all connections. Bug: 16874240 Change-Id: I5e950dd393c20173c439cbd5a4ba614ee09d61f4
/frameworks/native/services/sensorservice/SensorService.h
|
8a96955c8e14db40b16164236830fc9506a00872 |
|
29-Sep-2014 |
Aravind Akella <aakella@google.com> |
Fix sockfd leakage in SensorService. i) Call removeFd() only if the fd in the BitTube has been previously added to the Looper. Use a flag to determine whether the fd has been previously added or not. ii) Increment mPendingFlushEventsToSend after holding a connectionLock. iii) Store the number of acks that are pending in SensorEventQueue and send them all at once. Bug: 17472228 Change-Id: I1ec834fea1112a9cfbd9cddd2198438793698502
/frameworks/native/services/sensorservice/SensorService.h
|
0ec2066e4774b851c66176b99b0a5aa5abe6ad00 |
|
15-Sep-2014 |
Aravind Akella <aakella@google.com> |
SensorService fixes. i) Initialize sensor_event.flags to zero or wake_up flag before sending dropped flush_complete_events. This will avoid unnecessary acks. Currently it is not set to anything which may result in garbage values for flags field. ii) Change the dump format of SensorEventConnection. iii) Add const to method signatures wherever applicable. Bug id: https://b2.corp.google.com/issues/17498626 Change-Id: Ia736ffb01c366540aab73cdcf596ce852c052593
/frameworks/native/services/sensorservice/SensorService.h
|
8493b79e1cff92450076ca7450c4bf4e434a6816 |
|
09-Sep-2014 |
Aravind Akella <aakella@google.com> |
SensorService fixes i) Significant Motion multiple clients fix. Make a copy of mActiveConnections vector before cleaning up SensorEventConnections when one-shot sensors trigger. ii) Maintain a mapping between flush_complete_events and SensorEventConnections to accurately map flush() API calls and corresponding flush_complete_events iii) Remove all references to 1_1 and 1_2 HALs. iv) Dynamically allocate sensor_event buffers in SensorService main threadLoop. Bug: 17412359 Change-Id: If3c3986197660cafef2d2e0b4dc7582e229cf1c4
/frameworks/native/services/sensorservice/SensorService.h
|
9e3adfcebf28c5c76085108dffe98c74df56857d |
|
04-Sep-2014 |
Aravind Akella <aakella@google.com> |
SensorService flush fixes. i) Fix a possible race condition when adding a pending flush connection to mActiveSensors data structure. ii) Invalidate flush_complete_events as soon as they are consumed by a connection so that they are not used by other connections which are registered for the same sensor. Change-Id: I1491bea8c2081c4aab1feacc60add13b7aa26bb7
/frameworks/native/services/sensorservice/SensorService.h
|
5466c3d20d03d4ae4b0fd0e0a93175091e3b0bb2 |
|
23-Aug-2014 |
Aravind Akella <aakella@google.com> |
SensorService fixes 1) Limit maxEventsToWrite depending on the size of the socket buffer allocated (Fix for write failure on manta). 2) Do not call flush() if the sensor is not activated (OEM issue). Change-Id: I81ea78dbdef3a3773af505ca1c9a5e39492c0b48
/frameworks/native/services/sensorservice/SensorService.h
|
e74baf6ca7d57375f38540b6b7ac5e4af019951b |
|
21-Aug-2014 |
Aravind Akella <aakella@google.com> |
SensorService fixes. i) Add more debug stats (acks needed, acks received) ii) Comment out write failure message. Change-Id: Iac892a66530849a2dd023d6f5628cd070a79537d
/frameworks/native/services/sensorservice/SensorService.h
|
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/SensorService.h
|
56ae42613c91f6a6fb0dc3f626daa24666fd18c2 |
|
11-Jul-2014 |
Aravind Akella <aakella@google.com> |
SensorService performance improvements. i) Send ack for wake_up sensors on the socket connection instead of using Binder RPC. ii) Cache events per connection in case there are write failures. Compute cache size from FIFO counts of sensors. iii) Send FlushCompleteEvent only for apps that explicitly called flush(). Change-Id: I018969736b7794b1b930529586f2294a03ee8667
/frameworks/native/services/sensorservice/SensorService.h
|
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/SensorService.h
|
700180487ffec09d9df1657b018a7caadac24b75 |
|
08-Apr-2014 |
Aravind Akella <aakella@google.com> |
Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors This reverts commit 4369a4ebd5ae7567e7075bc82830b83178099ed5. Change-Id: Ifa8619cc6873470a07a987763d818d78d4232610
/frameworks/native/services/sensorservice/SensorService.h
|
4369a4ebd5ae7567e7075bc82830b83178099ed5 |
|
05-Apr-2014 |
Etienne Le Grand <etn@google.com> |
Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors" This reverts commit c57a019e117117c5a76c772970b26cd0f5db8c6a. Change-Id: I3540565bc3e56a32cf3b176a29216cf68bb763b2
/frameworks/native/services/sensorservice/SensorService.h
|
c57a019e117117c5a76c772970b26cd0f5db8c6a |
|
25-Mar-2014 |
Etienne Le Grand <etn@google.com> |
Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors Change-Id: If0f3dbdb5d2e9378e1fed4614baee4e750d0c850
/frameworks/native/services/sensorservice/SensorService.h
|
4b84704b97300eff3ebfab85652e64d54149d205 |
|
04-Mar-2014 |
Aravind Akella <aakella@google.com> |
Ignore flush complete events when recording last value for a sensor. Bug: 11822806 Change-Id: I1402d6684ed71ed413aef6a7be3aad945b331ec2
/frameworks/native/services/sensorservice/SensorService.h
|
b4099e77ec2bf8e9d4259ff30f0cb1d621deed91 |
|
16-Oct-2013 |
Aravind Akella <aakella@google.com> |
Bug fixes for SensorService i) Emulate Flush for AOSP Fusion Sesnsors on newer HALs that support batching. ii) Early return if there are no events for the current SensorEventConnection. Bug: 11325707, 11376538 Change-Id: Idb856302463649a99d3d5d0c965bb06ba06b8e1d
/frameworks/native/services/sensorservice/SensorService.h
|
c551eac5b16a53f872cbb692d3a0c81e39329725 |
|
15-Oct-2013 |
Aravind Akella <aakella@google.com> |
SensorService Flush API bug fix. SensorService is dead locking itself when flush is called on older devices which don't support batching. mConnectionLock is acquired twice. Change-Id: I5c25585bfb2b396df4b05826a9cba1da7997a3ee
/frameworks/native/services/sensorservice/SensorService.h
|
701166d9f60a6e1149ff568aec0e03f3f3925292 |
|
08-Oct-2013 |
Aravind Akella <aakella@google.com> |
Change API from flush(handle) to flush(). Call flush on all active sensors in the given SensorEventConnection. Change-Id: I4ef2bec80406c517903ab9782dc9eaf3fa8b7f36
/frameworks/native/services/sensorservice/SensorService.h
|
4c8b951f8d6a121e758bd3905fa8987c77863790 |
|
06-Sep-2013 |
Aravind Akella <aakella@google.com> |
Sensor Batching Bug fixes. i) SensorService dropping events. Increase SOCKET_BUFFER_SIZE in BitTube ctor. ii) Call flush before every activate. iii) Emulate flush for older devices. Add a trivial flush complete event when flush is called. Bug: 10641596 Change-Id: I30d0f3948e830457143f16e157b6ad81908687ce
/frameworks/native/services/sensorservice/SensorService.h
|
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/SensorService.h
|
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/SensorService.h
|
7438fd1a0132bc6de101e2a5f75040a119b6f29b |
|
08-Jul-2013 |
Mathias Agopian <mathias@google.com> |
simplify some unnecessary complex code getSensorType() ran in O(n) instead of O(1). fix that. Change-Id: Idcf29e46fc34db32604a0d8e5a9156486783b74f
/frameworks/native/services/sensorservice/SensorService.h
|
0319306670b0344da99efa606b6f172dde575a39 |
|
11-May-2013 |
Mathias Agopian <mathias@google.com> |
various fixes to the sensorservice 1) "google" sensors are now reporting AOSP as the vendor string 2) don't expose the system's sensor fusion if the HAL provides it 3) use uncalibrated gyro if availble for the system's sensor fusion Change-Id: I25140436cdb29d55e39fd6fbbf8c44a410a83d5c
/frameworks/native/services/sensorservice/SensorService.h
|
b6df7d0e4c2117ca476662bd52b6745b3d8a305f |
|
09-May-2013 |
Mathias Agopian <mathias@google.com> |
make all libsurfaceflinger and libsensorservice symbols's visibility hidden we only export the main entry-point. this saves about 150KB. Change-Id: I55eb2b6705386fdfa43860deb62f9cdd2a0982aa
/frameworks/native/services/sensorservice/SensorService.h
|
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/SensorService.h
|
5307d17fe33fc26eeeacd6339a9fbfe96cf56873 |
|
19-Sep-2012 |
Mathias Agopian <mathias@google.com> |
track UID with connections Change-Id: Id4865f3cd27a95acdbbfdff1f2bb4123f312a13b
/frameworks/native/services/sensorservice/SensorService.h
|
33264868ba0aaccb9d4b5e5a067a79a43633f6ec |
|
29-Jun-2012 |
Mathias Agopian <mathias@google.com> |
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
/frameworks/native/services/sensorservice/SensorService.h
|
b3989276d17f2b083bec67b695d1078fb86c6c53 |
|
21-Oct-2011 |
Mathias Agopian <mathias@google.com> |
Rename SensorChannel to BitTube
/frameworks/native/services/sensorservice/SensorService.h
|
1cb13461a8cf62e3ba634e5965332f2d284f6d42 |
|
28-Jun-2011 |
Mathias Agopian <mathias@google.com> |
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
/frameworks/native/services/sensorservice/SensorService.h
|
010e42230135815907e76e5d7e5f30edf9e1799d |
|
09-Jun-2011 |
Mathias Agopian <mathias@google.com> |
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
/frameworks/native/services/sensorservice/SensorService.h
|
a1b7db95b6ccf5be9d8dfaac1b8f45494813edc0 |
|
28-May-2011 |
Mathias Agopian <mathias@google.com> |
Fix a few issues with sensors reference-counting
/frameworks/native/services/sensorservice/SensorService.h
|
db5b4bce9e65ec9c2c7762b601297e4abadbc22a |
|
03-Feb-2011 |
Mathias Agopian <mathias@google.com> |
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
/frameworks/native/services/sensorservice/SensorService.h
|
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/SensorService.h
|
71d7a5c289c6ef6b5fc86dd4784a075ca6470e38 |
|
15-Nov-2010 |
Mathias Agopian <mathias@google.com> |
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
/frameworks/native/services/sensorservice/SensorService.h
|
94e8f6813f3fb2beaa9bcbfb1ad9b4ae2eb46949 |
|
11-Nov-2010 |
Mathias Agopian <mathias@google.com> |
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
/frameworks/native/services/sensorservice/SensorService.h
|
24d72350f321c17b0bfe1ef3fd52d4070a1c02c3 |
|
06-Nov-2010 |
Mathias Agopian <mathias@google.com> |
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
/frameworks/native/services/sensorservice/SensorService.h
|
3560fb24b668675627934356f210d84d19bf4e56 |
|
23-Jul-2010 |
Mathias Agopian <mathias@google.com> |
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
/frameworks/native/services/sensorservice/SensorService.h
|
cf51001dbf28e9885fcacd4048902f1c75768fe9 |
|
23-Jul-2010 |
Mathias Agopian <mathias@google.com> |
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
/frameworks/native/services/sensorservice/SensorService.h
|
7c1c531872a95051cb11ec829e3daf890d9bb58a |
|
22-Jul-2010 |
Mathias Agopian <mathias@google.com> |
propagate sensor event rate properly to the sensor HAL Change-Id: I1abe4c0fcce423caab79208353fded4d57398227
/frameworks/native/services/sensorservice/SensorService.h
|
50df2959e58fc7408f98d11d77c8428397dca445 |
|
20-Jul-2010 |
Mathias Agopian <mathias@google.com> |
SensorService doesn't crash if correct HAL is not present Change-Id: I83700b1a1b43390f5830e1056572bfb16e58e8e4
/frameworks/native/services/sensorservice/SensorService.h
|
5d2707214dfb97bd8dfcc6620be36841d3c82420 |
|
20-Jul-2010 |
Mathias Agopian <mathias@google.com> |
Better dumpsys logs Change-Id: Iae65a8547ee5815cc4c3b74d2c9ef17bed7f565d
/frameworks/native/services/sensorservice/SensorService.h
|
fc32881fcc68640d008c7515cdd1bcd866f72cd5 |
|
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/native/services/sensorservice/SensorService.h
|