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

Skip to content
Commit c63880a5 authored by Chris Kuiper's avatar Chris Kuiper
Browse files

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
parent edec715c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment