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

Skip to content
Commit 14cdb170 authored by Fiona Campbell's avatar Fiona Campbell
Browse files

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
parent 5719bdc9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment