Skip to content

Refactor BacklightHelper

Quang Ngô requested to merge ngoquang2708/powerdevil:backlight-helper into master

Currently BacklightHepler already have mechanisms to detect backlight devices. But it can only act on the first available device.

This MR add new devices action to expose detected backlight devices so that client can use to specify which device they want to work with in brightness related methods.

This MR add an addition device argument for brightness methods to let them know what device we want to work with.

To keep backward compatibility, this implementation will keep the old behavior that is to use the first available backlight device if client don't set the device parameter. Thought this may not necessary.

Clients (PowerdevilUPowerBackend) can do its own device detection to get list of available devices.

Edited by Quang Ngô

Merge request reports

Loading