[dimdisplay] Respect profile configurations
Manually conflict-resolved cherry-pick of !314 (merged). The only difference is that 6.0 still uses BackendInterface
(implemented only by PowerDevilUPowerBackend
) so instead of core()->screenBrightnessController()->
in master (post-6.0) we now use backend()->
in the 6.0 branch.
CC @anthonyfieroni who authored the original patch.
When profile is loaded after dim action is activated:
- Restore previous brightness values if new profile doesn't require dimming
- Override previous brightness values if new profile explicitly set
Signed-off-by: Anthony Fieroni bvbfan@abv.bg
(cherry-picked from 3b9a43a9)