History log of /frameworks/native/libs/sensor/ISensorServer.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/libs/sensor/ISensorServer.cpp
7acfd3175237197b0440e9a337d1db9ebdf20c55 07-Nov-2017 Ivan Lozano <ivanlozano@google.com> Fix sanitizer in ISensorService list functions.

The integer overflow sanitizer is throwing unsigned integer overflow
errors in the list functions in ISensorService. This refactors the loops
to prevent the overflow on the last iteration.

Test: Compiles and device boots without sanitizer errors.
Bug: 30969751
Change-Id: I6a7993024fdc71702e8e4e8ae535cfaf999e9dab
/frameworks/native/libs/sensor/ISensorServer.cpp
88711e8755e729682f32ee304d1cf0f60a3642bf 24-May-2017 Alexey Polyudov <apolyudov@google.com> sensors: pass sensor handle along with injected event

Change-Id: Ifa5825b08d5b809865f9066c7a763202cebb987f
/frameworks/native/libs/sensor/ISensorServer.cpp
dd5c5cb3b8f3df9b458dff74e247b9a542befee7 17-Mar-2017 Peng Xu <pengxu@google.com> Set sensor operation parameter implementation

Set operation parameter to sensor HAL. Possible paramters include
local geomagnetic field, local gravity acceleration, device dock
state, whether device should run in high performance mode, and
if a magnetic field calibration guide is in progress.

Bug: 30958130
Test: Tested with marlin. Modified hal implementation can get local
geomagnetic field.

Change-Id: Idaedd9e616d01383ba244cc64cf3e319ce02191f
/frameworks/native/libs/sensor/ISensorServer.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/libs/sensor/ISensorServer.cpp