Maintaining lux buffers since elapsed time and not uptime
We have historically preserved the lux buffers over a configurable long
horizon values since the clock uptime. However, the time when android is
sleeping is not accounted for in this, which is why the lux buffers can
go incorrect. Changing this to uptime, and also using the exact time at
which a sensor event was emitted to maintain the bufffer
Test: atest AutomaticBrightnessControllerTest
Bug: 341219242
Change-Id: I6b5c5b2c8754ddcd97249fcaf89b1575a865d4d8
5 files changed