History log of /frameworks/native/services/sensorservice/SensorEventConnection.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e752a5cc64b78f799525aa4e44e5f74e8c402465 16-Jan-2018 Svet Ganov <svetoslavganov@google.com> No sensor access to idle UIDs - native framework

Idle UIDs are ones that were in the background for long enough time.
Currently such apps can access sensor data even though they have no
user perceptible components running. This affects the user's privacy
since an app in the background can use sensor data to infer location,
activity, habits, etc.

The goal is to restrict sensor access for all apps in the ecosystem
regardless of target SDK which means the solution should be backwards
compatible. At the high level the sesnor service observes UID state
changes and applies policy like this:

Continuous sensors: for sensros in this reporting mode when the UID
goes in the background we will stop dispatching events. Once the UID
goes active we will start reporting the events. While this is an
app visible behavior change we would rather do that vs delivering
fake events.

Flush events: there is no change in behavior based on the UID state.
Hence, idle apps can request a flush and would get the completion
callback. From an app perspective flushing works at any point.

Trigger events: for sensors in this reporting mode when the UID
goes in the background we will not report any trigger events. From
an app perspective the sensor just did not pick up any events.

On-change events: for sensors in this reporting mode when the UID
goes in the background we will not report any change events. From
an app perspective the sensor just did not pick up any events.

Wake locks: since UIDs in idle state cannot acquire wakelocks we
will not be grabbing a wakelock on behalf of apps in that state.

Test: Added - SensorTest#testSanitizedContinuousEventsUidIdle
Added - SensorTest#testBatchAndFlushUidIdle
Pass - cts-tradefed run cts-dev -m CtsSensorTestCases

bug:63938985

Change-Id: I156803610ad6d86afaae641ebbb0e84f16d2344b
/frameworks/native/services/sensorservice/SensorEventConnection.cpp
8cbefd7af4801686c27d5802cfd087b2812110b6 11-Jul-2017 Peng Xu <pengxu@google.com> Synchronous resource recover mechanism for ISensorEventConnection

Add synchronous destroy() function to recover resource used by
remote ISensorEventConnection object.

Bug: 63542033
Test: SensorDirectReportTest pass
Change-Id: If98782ee12c7b1a733eb15a2fd8d7c5dacde243b
/frameworks/native/services/sensorservice/SensorEventConnection.cpp
63fbab896e139654d035c14a92a2d22a57e9c3e2 20-Jun-2017 Peng Xu <pengxu@google.com> Check key before edit value in countFlushCompleteEventsLocked

Fix an unchecked editValueFor that potentially causes log fatal
when sensor is removed from connection shortly before arrival of
flush complete message.

Bug: 62806749
Test: compiles, flush() still working.
Change-Id: I3684251b7bb746b01d0d8849024217c80ad52f9d
/frameworks/native/services/sensorservice/SensorEventConnection.cpp
801ea093b0e923a61b832f2adba698a273479880 07-Mar-2017 Mathias Agopian <mathias@google.com> split libsensor our of libgui

Test: compile & run
Bug: treble cleanup
Change-Id: I5b2c2a14f7d3b364d25695cf0901c5b08cfb0fc9
/frameworks/native/services/sensorservice/SensorEventConnection.cpp
e36e34731cbe77a49aa5e7d687dde041d83d0370 03-Nov-2016 Peng Xu <pengxu@google.com> Direct report mode support in sensor service and client

Added SensorDirectConnection to represent the direct channel.
The life-cycle is similar to that of SensorEventConnection.
Modified SensorDevice and SensorDeviceTreble to support new
HAL API. Added support in SensorManager, SensorService, binder
classes. Also added related helper functions in Sensor and dumpsys
support in SensorList.

Test: manual test with demo app
Bug: 30985702
Change-Id: I8750294b6aab717ed7f525299be642f1f0b85558
/frameworks/native/services/sensorservice/SensorEventConnection.cpp
ded526e8c3539b5986b46dffc1ff8ab15d7da570 13-Aug-2016 Peng Xu <pengxu@google.com> Fix dangerous unsafe_get() in SensorRecord

Change raw pointers to wp<> and constify relevant lines in
SensorRecord.

Bug: 30261110

Change-Id: I7f28c593366af44192991061fa5f71cf925b22a8
/frameworks/native/services/sensorservice/SensorEventConnection.cpp
755c451c7861a029e26e5f16e319b629169e656d 08-Apr-2016 Peng Xu <pengxu@google.com> sensorservice: switch to use sp<> in sensor list

* Switch to use smart pointer in SensorList to avoid object
life cycle issue.
* Refactor HardwareSensor and various virtual sensor class.
* Change active virtual sensor map into a set of handles.

Change-Id: I674d5eb5c0038179f9ef1b6f0d576b8b605649ec
/frameworks/native/services/sensorservice/SensorEventConnection.cpp
eb4d628b69831d533f14c09fd63400f75e69ba76 11-Dec-2015 Peng Xu <pengxu@google.com> Divide huge SensorService files into managable pieces

Splitted SensorService.cpp and SensorService.h into smaller more
manageable pieces with the embedded classes/structs now in individual
files.

Change-Id: I5e75c41b9e0e5c9aff102fe4b0f142c61d1203e2
/frameworks/native/services/sensorservice/SensorEventConnection.cpp