+17
−1
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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