Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c0acd6cd authored by Vladimir Komsiyski's avatar Vladimir Komsiyski
Browse files

Adjust the behavior of SensorManager for virtual device sensors.

The virtual device sensors are handled as runtime sensors internally. They are returned from getSensorsList *iff* the current context in SensorManager is associated with a virtual device, which has a custom sensors policy.

The SystemSensorManager adds a new implementation of getSensorList in order to avoid the cache the per-device sensor lists separately.

The virtual device sensors do not trigger DynamicSensorCallbacks and are removed from the system when the virtual device is closed. The virtual device broadcasts the fact that it's being closed so the SensorManager can clean up any cached lists associated with that device.

Bug: 237278244
Test: atest cts/tests/sensor
Change-Id: I63938377f4eedca32fba14d8e15e09be1b85e460
parent 30ea4280
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment