sensorservice: Fix SensorDevice::isSensorActive().
SensorDevice::isSensorActive() currently returns "numActiveClients() > 0", but it should return ".isActive". An "active client" is really one that has some requested batching parameters stored, which it can do even while the sensor is disabled but, the isActive bool tracks whether the the sensor is currently enabled at the HAL, which is what we really want. Bug: b/194878856 Test: Together with ag/15459770: 1) Reproduced problem and verified mIsProxActive in "dumpsys display" contains the correct value and no more 60/90Hz flicker. 2) Adding local debugs, then mixing making phone calls with additional "sensor_test sample -s8 -n5" commands to create several Prox clients, and verifying logged flags and reference counts. Change-Id: Id4a13ebb5cde8de87ee7547d2989c3c0d1a69a09
Loading
Please register or sign in to comment