Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mce] Expose battery/charging data on D-Bus. Fixes JB#37422
Tracking battery data via statefs requires dealing with fuse and kernel related quirks. Since mce already deals with that, it would be preferable to reuse already functioning code instead of duplicating it elsewhere. Add handlers D-Bus method calls that can be used to query current values and send signals when state changes are detected. The following information is made available: - usb_cable_state: unknown | connected | disconnected - charging_state: unknown | on | off - battery_status: unknown | full | ok | low | empty - battery_level: -1 | 0...100 Related D-Bus constants are defined in mce-headers >= 1.21.0. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com> REVIEW separate internal & dbus state processing more clearly
- Loading branch information
Showing
8 changed files
with
820 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.