Loading
Ensure BrightnessTracker is only "start()"ed once
Here, we use mStarted to ensure that we dont reregister any broadcast recievers. This was happening because initialize() would be called for each DPC (of which there is one per display). This would cause start() and stop() each to be called multiple times - causing a crash. There is only one BrightnessTracker per device, however it needs to be initialized within DPC because we need an initial brightness value, which the first-initialised DPC provides us with. Test: atest BrightnessTrackerTest Bug: 253267570 Change-Id: I8f2aa74f5938cb370e97bf55dd97823be2a32627